Files
odoo_source/addons/stock_account/views/product_views.xml
T
Yannick Tivisse a5874da269 [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>
2020-07-08 11:04:09 +00:00

43 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="product_template_tree_view" model="ir.ui.view">
<field name="name">product.template.tree.inherit.stock.account</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="standard_price" position="attributes">
<attribute name="readonly">1</attribute>
</field>
</field>
</record>
<record id="view_category_property_form" model="ir.ui.view">
<field name="name">product.category.stock.property.form.inherit</field>
<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="inside">
<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')]}" />
<field name="property_stock_account_output_categ_id" attrs="{'required':[ ('property_valuation', '=', 'real_time')]}" />
<div colspan="2" class="alert alert-info mt16" role="status">
<b>Set other input/output accounts on specific </b><button name="%(stock.action_prod_inv_location_form)d" role="button" type="action" class="btn-link" style="padding: 0;vertical-align: baseline;" string="locations"/>.
</div>
</group>
</group>
<group name="account_property" position="before">
<group>
<group string="Inventory Valuation">
<field name="property_cost_method"/>
<field name="property_valuation" groups="account.group_account_readonly,stock.group_stock_manager"/>
</group>
</group>
</group>
</field>
</record>
</data>
</odoo>