[FIX] mrp: allow to select BoM with a product template only

This commit is contained in:
Martin Trigaux 2014-11-24 16:41:39 +01:00
parent 23c010c9b4
commit 1b4953c892
1 changed files with 7 additions and 1 deletions

View File

@ -700,7 +700,13 @@
<field name="date_planned"/>
</group>
<group>
<field name="bom_id" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)" required="1"/>
<field name="bom_id"
domain="['|',
('product_id','=',product_id),
'&amp;',
('product_tmpl_id.product_variant_ids','=',product_id),
('product_id','=',False)]"
context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)" required="1"/>
<field name="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'mrp.group_mrp_user']}"/>
<field name="origin"/>