[IMP] mrp: restrict serial numbers to choose for final_lot_id

When producing products tracked by serial number only allow to choose
a serial number produced in a previous work order in the same
manufacturing order.
This commit is contained in:
Joren Van Onder
2017-08-30 14:25:18 +02:00
committed by Pierre Masereel
parent 0a1aaba3c8
commit 4bfd6284dc
+1 -1
View File
@@ -141,7 +141,7 @@
<group>
<group>
<field name="qty_producing" string="Current Qty" attrs="{'readonly': ['|', ('product_tracking', '=', 'serial'), ('state', 'in', ('done', 'cancel'))]}"/>
<field name="final_lot_id" context="{'default_product_id': product_id}" attrs="{'invisible': [('product_tracking', '=', 'none')]}" groups="stock.group_production_lot"/>
<field name="final_lot_id" context="{'default_product_id': product_id}" domain="['|', '&amp;', ('product_id', '=', product_id), ('product_id.tracking', '!=', 'serial'), ('use_next_on_work_order_id', '=', id)]" attrs="{'invisible': [('product_tracking', '=', 'none')]}" groups="stock.group_production_lot"/>
<field name="product_tracking" invisible="1"/>
</group>
</group>