diff options
| author | Yannick Tivisse <yti@odoo.com> | 2016-04-01 11:53:32 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-04-04 09:59:24 +0200 |
| commit | 8db497185dcbd5a02ed648951a6bb20d60aa17d3 (patch) | |
| tree | dbae0ec15e04c34ec75888da80ae910fe34d373c /addons | |
| parent | e64b84ed9ade5a40df176b7684a9811ba1a9d8e7 (diff) | |
[IMP] stock_account: Hide 'Account Stock Properties' if 'Perpetual' valuation
Because if you set the inventory valuation as manual you don't create
accounting entries automatically when stock moves are confirmed.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/views/product_view.xml | 4 | ||||
| -rw-r--r-- | addons/stock_account/product_view.xml | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/addons/account/views/product_view.xml b/addons/account/views/product_view.xml index 0102eef6133..c743731fcbb 100644 --- a/addons/account/views/product_view.xml +++ b/addons/account/views/product_view.xml @@ -35,8 +35,8 @@ <field name="inherit_id" ref="product.product_category_form_view"/> <field name="arch" type="xml"> <group name="first" position="after"> - <group> - <group name="account_property" string="Account Properties"> + <group name="account_property"> + <group string="Account Properties"> <field name="property_account_income_categ_id" domain="[('internal_type','=','other'),('deprecated', '=', False)]"/> <field name="property_account_expense_categ_id" domain="[('internal_type','=','other'),('deprecated', '=', False)]"/> </group> diff --git a/addons/stock_account/product_view.xml b/addons/stock_account/product_view.xml index 69fe3cddd7e..3c6b8072702 100644 --- a/addons/stock_account/product_view.xml +++ b/addons/stock_account/product_view.xml @@ -7,16 +7,20 @@ <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="after"> - <group name="account_stock_property" string="Account Stock Properties"> + <group name="account_property" position="inside"> + <group name="account_stock_property" string="Account Stock Properties" attrs="{'invisible': [('property_valuation', '=', 'manual_periodic')]}"> <field name="property_stock_account_input_categ_id" domain="[('deprecated', '=', False)]"/> <field name="property_stock_account_output_categ_id" domain="[('deprecated', '=', False)]"/> <field name="property_stock_valuation_account_id" domain="[('deprecated', '=', False)]"/> <field name="property_stock_journal"/> </group> - <group string="Inventory Valuation"> - <field name="property_cost_method" groups="stock_account.group_inventory_valuation"/> - <field name="property_valuation"/> + </group> + <group name="account_property" position="after"> + <group> + <group string="Inventory Valuation"> + <field name="property_cost_method" groups="stock_account.group_inventory_valuation"/> + <field name="property_valuation"/> + </group> </group> </group> </field> |
