Skip to content
Snippets Groups Projects
Commit 228a5041 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[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: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 805b7504
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment