From 815154df2e6d41d58c73a22b2edc82223ac79a4d Mon Sep 17 00:00:00 2001 From: Kirti Choudhary Date: Tue, 7 Aug 2018 10:33:29 +0200 Subject: [PATCH] [IMP] various: clean product search views Lots of modules are adding their search view for products this commit tries to clean them in order to have something clearer --- addons/hr_expense/views/hr_expense_views.xml | 1 + addons/mrp/views/mrp_production_views.xml | 11 +++---- addons/mrp/views/product_views.xml | 30 ++++++++++++------- .../product/views/product_template_views.xml | 1 + .../purchase/report/purchase_report_views.xml | 4 ++- addons/purchase/views/purchase_views.xml | 3 +- .../report_all_channels_sales_views.xml | 2 ++ addons/sale/views/sale_views.xml | 1 + addons/stock/views/product_views.xml | 15 ++++++++++ addons/website_sale/views/product_views.xml | 1 + 10 files changed, 52 insertions(+), 17 deletions(-) diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index b09d265fa5b..4f3efb342b8 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -323,6 +323,7 @@ product.product form kanban,tree,form + {"default_can_be_expensed": 1, 'default_type': 'service'} [('can_be_expensed', '=', True)] diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 5687f10c605..63036ccb27e 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -260,6 +260,10 @@ + + @@ -267,9 +271,6 @@ - - @@ -281,8 +282,8 @@ - - + + diff --git a/addons/mrp/views/product_views.xml b/addons/mrp/views/product_views.xml index 6439863312b..31d66394f92 100644 --- a/addons/mrp/views/product_views.xml +++ b/addons/mrp/views/product_views.xml @@ -15,39 +15,49 @@ - - product.template.search.bom - product.template - - + + + mrp.product.template.search + product.template + primary + + - + - - product.form.mrp.inherited + + + mrp.product.product.search product.product + primary - - + + + + + Products product.template form + kanban,tree,form {"search_default_consumable": 1, 'default_type': 'product'} + + diff --git a/addons/product/views/product_template_views.xml b/addons/product/views/product_template_views.xml index abcfc5c8327..8aa451f6f55 100644 --- a/addons/product/views/product_template_views.xml +++ b/addons/product/views/product_template_views.xml @@ -107,6 +107,7 @@ kanban,tree,form form + {"search_default_filter_to_sell":1}

diff --git a/addons/purchase/report/purchase_report_views.xml b/addons/purchase/report/purchase_report_views.xml index 5bc8256ee7b..ec9b5005212 100644 --- a/addons/purchase/report/purchase_report_views.xml +++ b/addons/purchase/report/purchase_report_views.xml @@ -56,6 +56,8 @@ + @@ -70,10 +72,10 @@ + - diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index cbe5485d275..425fd472087 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -56,7 +56,7 @@ form kanban,tree,form {"search_default_filter_to_purchase":1, "purchase_product_template": 1} - +

@@ -77,6 +77,7 @@ product.product tree,kanban,form form + {"search_default_filter_to_purchase": 1}

diff --git a/addons/sale/report/report_all_channels_sales_views.xml b/addons/sale/report/report_all_channels_sales_views.xml index a29bf412a6c..102a8993390 100644 --- a/addons/sale/report/report_all_channels_sales_views.xml +++ b/addons/sale/report/report_all_channels_sales_views.xml @@ -17,7 +17,9 @@ + + diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index e3688b3fe70..69f9eabf864 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -62,6 +62,7 @@ kanban,tree,form form + {"search_default_filter_to_sell":1, "sale_multi_pricelist_product_template": 1}

diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml index 04bf63cac3e..d89245c4a01 100644 --- a/addons/stock/views/product_views.xml +++ b/addons/stock/views/product_views.xml @@ -76,6 +76,20 @@ + + product.product.search.stock.form + product.product + primary + + + + + + + + + + product.template.stock.property.form.inherit @@ -340,6 +354,7 @@ product.template kanban,tree,form form + {"search_default_consumable": 1, 'default_type': 'product'}

diff --git a/addons/website_sale/views/product_views.xml b/addons/website_sale/views/product_views.xml index c3edd829154..706460b6454 100644 --- a/addons/website_sale/views/product_views.xml +++ b/addons/website_sale/views/product_views.xml @@ -17,6 +17,7 @@ product.template form kanban,tree,form + {'search_default_published': 1, 'default_website_published': True}