odoo/addons/stock_account/views/product_views.xml

103 lines
6.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<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">
<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>
<group name="account_property" position="before">
<group>
<group string="Inventory Valuation">
<field name="property_cost_method" groups="stock_account.group_inventory_valuation"/>
<field name="property_valuation"/>
</group>
</group>
</group>
</field>
</record>
<record id="view_template_property_form" model="ir.ui.view">
<field name="name">product.template.stock.property.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<data>
<field name="list_price" position="after">
<field name="valuation" invisible="1" readonly="1"/>
<field name="cost_method" invisible="1" readonly="1"/>
<field name="property_cost_method" groups="stock_account.group_inventory_valuation" invisible="1"/>
</field>
<field name="standard_price" position="replace">
<field name="standard_price"
attrs="{'readonly':['&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" class="oe_inline"
widget='monetary' options="{'currency_field': 'currency_id'}"/>
</field>
<div name="standard_price_uom" position="after">
<button string="Set standard price" type="action"
name="%(action_view_change_standard_price)d"
attrs="{'invisible':['|', '|', ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['standard']), ('product_variant_count', '>', 1)]}"
class="oe_link oe_read_only" colspan="2"
groups="stock_account.group_inventory_valuation"/>
</div>
<div name="standard_price_uom" position="after">
<button string="Set standard price" type="action"
name="%(action_view_change_standard_price)d"
attrs="{'invisible':['|', '|', ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['average']), ('product_variant_count', '>', 1)]}"
class="oe_link oe_read_only" colspan="2"
groups="stock_account.group_inventory_valuation"/>
</div>
<group name="accounting" position="inside">
<group name="property_inventory_valuation" groups="stock_account.group_inventory_valuation" attrs="{'invisible': [('type','=','service')]}">
<field name="property_valuation" invisible="1"/>
<field name="property_stock_account_input"
attrs="{'invisible':[ ('valuation', '!=', 'real_time')]}"
domain="[('deprecated', '=', False)]"/>
<field name="property_stock_account_output"
attrs="{'invisible':[ ('valuation', '!=', 'real_time')]}"
domain="[('deprecated', '=', False)]"/>
</group>
</group>
</data>
</field>
</record>
<record id="product_variant_easy_edit_view_inherit" model="ir.ui.view">
<field name="name">product.product.product.view.form.easy.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_variant_easy_edit_view"/>
<field name="arch" type="xml">
<data>
<field name="standard_price" position="after">
<field name="valuation" invisible="1"/>
<field name="cost_method" invisible="1"/>
</field>
<field name="standard_price" position="after">
<button string="Set standard price" type="action"
name="%(action_view_change_standard_price)d"
attrs="{'invisible':['|',('valuation','!=', 'real_time'), ('cost_method', 'not in', ['standard'])]}"
class="oe_link oe_read_only" colspan="2"
groups="stock_account.group_inventory_valuation"/>
</field>
<field name="standard_price" position="after">
<button string="Set standard price" type="action"
name="%(action_view_change_standard_price)d"
attrs="{'invisible':['|',('valuation','!=', 'real_time'), ('cost_method', 'not in', ['average'])]}"
class="oe_link oe_read_only" colspan="2"
groups="stock_account.group_inventory_valuation"/>
</field>
</data>
</field>
</record>
</data>
</odoo>