Hello,
In a BOM components tree view sometimes product are archived and Odoo do not provide a way to display them easily.
I see that we can add "decoration-danger" to tree attribute to set some lines in red.
I've tried this method to highlight the archived product in BOM components tree view but I can't manage to find the good syntax.
I tried to edit mrp.bom.form:
<notebook>
<page string="Components">
<field name="bom_line_ids" widget="one2many" context="{'default_parent_product_tmpl_id': product_tmpl_id, 'default_product_id': False, 'default_company_id': company_id, 'default_routing_id': routing_id}">
<tree string="Components" editable="bottom">
<field name="company_id" invisible="1"/>
<field name="routing_id" invisible="1"/>
<field name="sequence" widget="handle"/>
<field name="product_id" context="{'default_type': 'product'}"/>
<field name="product_tmpl_id" invisible="1"/>
...
</tree>
</field>
</page>
with
<tree string="Components" editable="bottom" decoration-danger="active==True">
or
<tree string="Components" editable="bottom" decoration-danger="product_tmpl_id.active==True">
Without success :/
Any idea welcome!
Laurent
Hello Laurent,
Can you provide a screenshot? I am not clear on which view are you referring to.
Thanks