[IMP] mrp: Only show products with active bom
Currently, if you create a manufacturing order, you can select all the product that have a BOM. But some product have BOM that are archived or that can't be manufactured. This commit add a constraint in the domain for product field. The constraint ensure that BOM are not archived nor phantom BOM.
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
<field name="has_moves" invisible="1"/>
|
||||
<field name="check_to_done" invisible="1"/>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="product_id" attrs="{'readonly': [('has_moves', '=', True)]}" domain="[('bom_ids', '!=', False)]"/>
|
||||
<field name="product_id" attrs="{'readonly': [('has_moves', '=', True)]}" domain="[('bom_ids', '!=', False), ('bom_ids.active', '=', True), ('bom_ids.type', '=', 'normal')]"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
|
||||
Reference in New Issue
Block a user