From d0198d167225be9f35b45a3c61ddc00da2979f7c Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 27 Dec 2021 18:21:34 +0100 Subject: [PATCH] [MOV] sale: reorder sale actions * Move specific actions to their place of use (as they are not expected to be used anywhere else) * order actions by use/importance in sale_order_views.xml, and server actions in a specific "section" --- addons/sale/views/crm_team_views.xml | 62 ++++++++++- addons/sale/views/sale_order_views.xml | 137 ++++++++----------------- 2 files changed, 102 insertions(+), 97 deletions(-) diff --git a/addons/sale/views/crm_team_views.xml b/addons/sale/views/crm_team_views.xml index f720e95a89e..d473b62cd2e 100644 --- a/addons/sale/views/crm_team_views.xml +++ b/addons/sale/views/crm_team_views.xml @@ -1,7 +1,30 @@ - + + + Quotations + ir.actions.act_window + sale.order + + tree,form,calendar,graph,kanban,pivot + { + 'search_default_team_id': [active_id], + 'default_team_id': active_id, + 'show_address': 1, + } + + [] + + +

+ Create a new quotation, the first step of a new sale! +

+ Once the quotation is confirmed by the customer, it becomes a sales order.
You will be able to create an invoice and collect the payment. +

+
+
+ New Quotation sale.order @@ -16,6 +39,43 @@ + + Sales Orders + ir.actions.act_window + sale.order + tree,form,calendar,graph,kanban,pivot + + [('state','not in',('draft','sent','cancel'))] + { + 'search_default_team_id': [active_id], + 'default_team_id': active_id, + } + + +

+ Create a new quotation, the first step of a new sale! +

+ Once the quotation is confirmed by the customer, it becomes a sales order.
You will be able to create an invoice and collect the payment. +

+
+
+ + + Sales Orders + ir.actions.act_window + sale.order + tree,form,calendar,graph,kanban,pivot + + [('invoice_status','=','to invoice')] + { + 'search_default_team_id': [active_id], + 'default_team_id': active_id, + } + + + + + crm.team.form crm.team diff --git a/addons/sale/views/sale_order_views.xml b/addons/sale/views/sale_order_views.xml index 14f25655dab..9aa0d5c72dd 100644 --- a/addons/sale/views/sale_order_views.xml +++ b/addons/sale/views/sale_order_views.xml @@ -714,7 +714,7 @@ - + Sales Orders @@ -775,54 +775,6 @@ - - Orders to Invoice - ir.actions.act_window - sale.order - tree,form,calendar,graph,pivot,kanban,activity - {'create': False} - [('invoice_status','=','to invoice')] - - -

- No orders to invoice found -

- You can select all orders and invoice them in batch,
- or check every order and invoice them one by one. -

-
-
- - - Mark Quotation as Sent - - - form,list - code - action = records.action_quotation_sent() - - - - Orders to Upsell - ir.actions.act_window - sale.order - tree,form,calendar,graph,pivot,kanban,activity - [('invoice_status','=','upselling')] - {'create': False} - - -

- No orders to upsell found. -

- An order is to upsell when delivered quantities are above initially - ordered quantities, and the invoicing policy is based on ordered quantities. -

- As an example, if you sell pre-paid hours of services, Odoo recommends you - to sell extra hours when all ordered hours have been consumed. -

-
-
- Quotations ir.actions.act_window @@ -898,61 +850,54 @@ - - - Sales Orders + + Orders to Invoice ir.actions.act_window sale.order - tree,form,calendar,graph,kanban,pivot - - [('state','not in',('draft','sent','cancel'))] - { - 'search_default_team_id': [active_id], - 'default_team_id': active_id, - } - - -

- Create a new quotation, the first step of a new sale! -

- Once the quotation is confirmed by the customer, it becomes a sales order.
You will be able to create an invoice and collect the payment. -

-
-
- - Sales Orders - ir.actions.act_window - sale.order - tree,form,calendar,graph,kanban,pivot - + tree,form,calendar,graph,pivot,kanban,activity + {'create': False} [('invoice_status','=','to invoice')] - { - 'search_default_team_id': [active_id], - 'default_team_id': active_id, - } - - - - Quotations - ir.actions.act_window - sale.order - - tree,form,calendar,graph,kanban,pivot - { - 'search_default_team_id': [active_id], - 'default_team_id': active_id, - 'show_address': 1, - } - - [] - +

- Create a new quotation, the first step of a new sale! + No orders to invoice found

- Once the quotation is confirmed by the customer, it becomes a sales order.
You will be able to create an invoice and collect the payment. + You can select all orders and invoice them in batch,
+ or check every order and invoice them one by one.

+ + Orders to Upsell + ir.actions.act_window + sale.order + tree,form,calendar,graph,pivot,kanban,activity + [('invoice_status','=','upselling')] + {'create': False} + + +

+ No orders to upsell found. +

+ An order is to upsell when delivered quantities are above initially + ordered quantities, and the invoicing policy is based on ordered quantities. +

+ As an example, if you sell pre-paid hours of services, Odoo recommends you + to sell extra hours when all ordered hours have been consumed. +

+
+
+ + + + + Mark Quotation as Sent + + + form,list + code + action = records.action_quotation_sent() + +