From a5874da269fc5546f45a2aadd022eb9dbab166e7 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 8 Jul 2020 09:45:05 +0000 Subject: [PATCH] [IMP] purchase,stock_account: Improve account properties display Purpose ======= https://github.com/odoo/odoo/pull/52351 already improved the display by hiding some account properties if it wasn't really neeeded on manual inventory valuation. Specification ============= Keep the Account Properties section visible in any cases. The price difference account is the only field of the section which is only used in automated valuation. closes odoo/odoo#54210 Taskid: 2232026 Signed-off-by: Yannick Tivisse (yti) --- addons/purchase_stock/__manifest__.py | 1 + .../purchase_stock/views/product_category_views.xml | 13 +++++++++++++ addons/stock_account/views/product_views.xml | 5 +---- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 addons/purchase_stock/views/product_category_views.xml diff --git a/addons/purchase_stock/__manifest__.py b/addons/purchase_stock/__manifest__.py index ae43f2adab8..70745809351 100644 --- a/addons/purchase_stock/__manifest__.py +++ b/addons/purchase_stock/__manifest__.py @@ -21,6 +21,7 @@ 'views/res_config_settings_views.xml', 'views/res_partner_views.xml', 'views/stock_production_lot_views.xml', + 'views/product_category_views.xml', 'report/purchase_report_views.xml', 'report/purchase_report_templates.xml', 'report/report_stock_rule.xml', diff --git a/addons/purchase_stock/views/product_category_views.xml b/addons/purchase_stock/views/product_category_views.xml new file mode 100644 index 00000000000..43320f30ea5 --- /dev/null +++ b/addons/purchase_stock/views/product_category_views.xml @@ -0,0 +1,13 @@ + + + + product.category.view.form.inherit.purchase.stock + product.category + + + + {'invisible':[('property_valuation', '=', 'manual_periodic')]} + + + + diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml index 5d0d06382df..f4c47e58b83 100644 --- a/addons/stock_account/views/product_views.xml +++ b/addons/stock_account/views/product_views.xml @@ -17,11 +17,8 @@ product.category - - {'invisible':[('property_valuation', '=', 'manual_periodic')]} - - +