[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:
amoyaux
2017-03-31 10:57:18 +02:00
committed by Pierre Masereel
parent 2382520c34
commit 08c610835f
+1 -1
View File
@@ -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">