From 2d03eb42556c5f23a14ee956d19e20dfd39aa790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 2 Oct 2018 13:35:23 +0200 Subject: [PATCH] [IMP] crm, sale, sale_crm, website_sale: add activity view on main actions Purpose is to extend the use of the newly-introduced activity view allowing to see at a glance activities to perform on a given model. It eases daily job of people working with activities. Updated * CRM and Sale/CRM main menus: pipeline, leads, quotations; * Sales main menus: quotations, orders, to invoice/to upsell, products; * Website Sale: quotations, orders, to invoice, abandoned; This commit is linked to task ID 1889413. --- addons/crm/views/crm_lead_views.xml | 6 +++--- addons/sale/views/sale_views.xml | 11 ++++++----- addons/website_sale/views/product_views.xml | 2 +- addons/website_sale/views/sale_order_views.xml | 10 +++++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index 5023fd4fab2..3e013e2a322 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -870,7 +870,7 @@ for rec in records: Leads crm.lead - tree,kanban,graph,pivot,calendar,form + tree,kanban,graph,pivot,calendar,form,activity ['|', ('type','=','lead'), ('type','=',False)] { @@ -928,7 +928,7 @@ for rec in records: Opportunities crm.lead - kanban,tree,graph,pivot,form,calendar + kanban,tree,graph,pivot,form,calendar,activity [('type','=','opportunity')] { 'default_type': 'opportunity', @@ -990,7 +990,7 @@ for rec in records: Pipeline crm.lead - kanban,tree,graph,pivot,form,calendar + kanban,tree,graph,pivot,form,calendar,activity [('type','=','opportunity')] { 'default_type': 'opportunity', diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 8542a8e56b7..f27d52363f5 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -57,7 +57,7 @@ Products ir.actions.act_window product.template - kanban,tree,form + kanban,tree,form,activity form @@ -671,7 +671,7 @@ ir.actions.act_window sale.order form - tree,kanban,form,calendar,pivot,graph + tree,kanban,form,calendar,pivot,graph,activity {} [('state', 'not in', ('draft', 'sent', 'cancel'))] @@ -737,7 +737,7 @@ ir.actions.act_window sale.order form - tree,form,calendar,graph,pivot,kanban + tree,form,calendar,graph,pivot,kanban,activity {'create': False} [('invoice_status','=','to invoice')] @@ -766,7 +766,7 @@ ir.actions.act_window sale.order form - tree,form,calendar,graph,pivot,kanban + tree,form,calendar,graph,pivot,kanban,activity [('invoice_status','=','upselling')] {'create': False} @@ -794,7 +794,7 @@ sale.order form - tree,kanban,form,calendar,pivot,graph + tree,kanban,form,calendar,pivot,graph,activity {'search_default_my_quotation': 1} @@ -810,6 +810,7 @@ Quotations ir.actions.act_window sale.order + tree,kanban,form,calendar,pivot,graph,activity {'search_default_my_quotation': 1} diff --git a/addons/website_sale/views/product_views.xml b/addons/website_sale/views/product_views.xml index 9ebf0340b9b..72452ce93b7 100644 --- a/addons/website_sale/views/product_views.xml +++ b/addons/website_sale/views/product_views.xml @@ -16,7 +16,7 @@ Products product.template form - kanban,tree,form + kanban,tree,form,activity {'search_default_published': 1, 'default_website_published': True} diff --git a/addons/website_sale/views/sale_order_views.xml b/addons/website_sale/views/sale_order_views.xml index 0f77a6e4de8..ca1244fef2c 100644 --- a/addons/website_sale/views/sale_order_views.xml +++ b/addons/website_sale/views/sale_order_views.xml @@ -57,7 +57,7 @@ Orders sale.order - tree,form,kanban + tree,form,kanban,activity {'show_sale': True, 'search_default_order_confirmed': 1, 'search_default_from_website': 1} @@ -70,7 +70,7 @@ Unpaid Orders sale.order - tree,form,kanban + tree,form,kanban,activity [('state', '=', 'sent'), ('team_id.team_type', '=', 'website')] {'show_sale': True, 'create': False} @@ -97,7 +97,7 @@ Abandoned Carts sale.order - tree,form,kanban + tree,form,kanban,activity [('is_abandoned_cart', '=', True)] @@ -143,7 +143,7 @@ Unpaid Orders sale.order - tree,kanban,form + tree,kanban,form,activity form [('state', '=', 'sent'), ('team_id.team_type', '=', 'website')] @@ -162,7 +162,7 @@ Abandoned Carts sale.order form - tree,kanban,form + tree,kanban,form,activity [('state', '=', 'draft'), ('order_line', '!=', False), ('partner_id', '!=', context.get('public_partner_id')), ('team_id.team_type', '=', 'website'), ('date_order', '<=', (datetime.datetime.utcnow() - datetime.timedelta(hours=1)).strftime('%Y-%m-%d %H:%M:%S'))]