Files
odoo_source/addons/mrp_subcontracting/views/mrp_bom_views.xml
T
Arnold Moyaux a684372fdd [IMP] mrp_subcontracting: subcontractors required
Force to set subcontractors on subcontracting BoM since
it's always used in order to determine if a subcontracting
should be apply on a receipt or not. Also there is not magical
behavior has 'if there is no subcontractor on the BoM then it
means all partners...'
2019-08-19 15:03:59 +00:00

15 lines
645 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_bom_form_view" model="ir.ui.view">
<field name="name">mrp.bom.form.view</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="subcontractor_ids" widget="many2many_tags" context="{'default_type': 'subcontractor'}" attrs="{'invisible': [('type', '!=', 'subcontract')], 'required': [('type', '=', 'subcontract')]}"/>
</xpath>
</field>
</record>
</odoo>