Files
manufacture/mrp_bom_attribute_match/views/mrp_bom_views.xml
Ivàn Todorovich 30a41e1711 [IMP] mrp_bom_attribute_match: Drop the web_field_domain dependency.
The same result can be achieved with a computed field.
Moreover, we have one already in odoo core. Originally it was a related
field, but we can change it to a computed and add our extra logic there.
2022-10-27 16:42:33 -03:00

34 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mrp_bom_form_view" model="ir.ui.view">
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<field name="bom_product_template_attribute_value_ids" position="before">
<field
name="match_on_attribute_ids"
readonly='1'
force_save="1"
widget="many2many_tags"
/>
<field name="product_backup_id" invisible="1" />
</field>
<xpath
expr="//field[@name='bom_line_ids']//field[@name='product_id']"
position="after"
>
<field name="component_template_id" />
</xpath>
<xpath
expr="//field[@name='bom_line_ids']//field[@name='product_id']"
position="attributes"
>
<attribute name="attrs">
{'readonly': [('component_template_id', '!=', False)]}
</attribute>
<attribute name="force_save">"1"</attribute>
</xpath>
</field>
</record>
</odoo>