diff options
| author | Yannick Tivisse <yti@odoo.com> | 2020-07-08 09:45:05 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-07-08 11:04:09 +0000 |
| commit | a5874da269fc5546f45a2aadd022eb9dbab166e7 (patch) | |
| tree | 88b3d53ec9345698fe627f2fdefb01bcd548b327 | |
| parent | cb26f1aabdbd53f1ce9650659a256ce9c994391d (diff) | |
[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) <yti@odoo.com>
| -rw-r--r-- | addons/purchase_stock/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/purchase_stock/views/product_category_views.xml | 13 | ||||
| -rw-r--r-- | addons/stock_account/views/product_views.xml | 5 |
3 files changed, 15 insertions, 4 deletions
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 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="product_category_view_form" model="ir.ui.view"> + <field name="name">product.category.view.form.inherit.purchase.stock</field> + <field name="model">product.category</field> + <field name="inherit_id" ref="purchase.view_category_property_form"/> + <field name="arch" type="xml"> + <field name="property_account_creditor_price_difference_categ" position="attributes"> + <attribute name="attrs">{'invisible':[('property_valuation', '=', 'manual_periodic')]}</attribute> + </field> + </field> + </record> +</odoo> 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 @@ <field name="model">product.category</field> <field name="inherit_id" ref="account.view_category_property_form"/> <field name="arch" type="xml"> - <group name="account_property" position="attributes"> - <attribute name="attrs">{'invisible':[('property_valuation', '=', 'manual_periodic')]}</attribute> - </group> <group name="account_property" position="inside"> - <group name="account_stock_property" string="Account Stock Properties" groups="account.group_account_readonly"> + <group name="account_stock_property" string="Account Stock Properties" groups="account.group_account_readonly" attrs="{'invisible':[('property_valuation', '=', 'manual_periodic')]}"> <field name="property_stock_valuation_account_id" options="{'no_create': True}" attrs="{'required':[('property_valuation', '=', 'real_time')]}"/> <field name="property_stock_journal" attrs="{'required':[('property_valuation', '=', 'real_time')]}" /> <field name="property_stock_account_input_categ_id" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" /> |
