[FIX] stock_landed_costs: service and landed cost
In saas-11.3 "Is a Landed Cost" (landed_cost_ok) was moved from the product accounting tab, to the inventory tab. The inventory tab is only shown for product not of type service, but the field should be shown when product is of type service, consu or product. With this changeset, "Is a Landed Cost" is displayed in the top and "Split Method" is hidden: to specify the split method, this needs to be done from products in Inventory > Configuration > Landed Cost Types, or by the list view of cost lines when creating a landed cost. opw-1949329 closes #31714 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -7,11 +7,16 @@
|
||||
<field name="inherit_id" ref="purchase.view_product_supplier_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='inventory']" position="inside">
|
||||
<group string="Inventory Valuation" name="inventory_valuation">
|
||||
<field name="landed_cost_ok" class="oe_inline" attrs="{'invisible':[('type', 'not in', ['product', 'consu', 'service'])]}"/>
|
||||
<field name="split_method" attrs="{'invisible':['|', ('landed_cost_ok', '=' ,False), ('type', 'not in', ['product', 'consu', 'service'])]}"/>
|
||||
<group string="Inventory Valuation" name="inventory_valuation" invisible="1">
|
||||
<field name="split_method" invisible="1"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<div name="options" position="inside">
|
||||
<div attrs="{'invisible':[('type', 'not in', ['product', 'consu', 'service'])]}">
|
||||
<field name="landed_cost_ok"/>
|
||||
<label for="landed_cost_ok"/>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user