[FIX] mrp: allows to select the BOM on workorder messages

This commit is contained in:
Fabien Pinckaers
2016-08-26 11:48:06 +02:00
committed by Josse Colpaert
parent 2b2351a644
commit 8765353fa7
+1 -1
View File
@@ -20,7 +20,7 @@ class MrpProductionMessage(models.Model):
message = fields.Html(required=True)
product_tmpl_id = fields.Many2one('product.template', 'Product Template')
product_id = fields.Many2one('product.product', string="Product")
bom_id = fields.Many2one('mrp.bom', 'Bill of Material', domain="[('product_id', '=', product_id)]")
bom_id = fields.Many2one('mrp.bom', 'Bill of Material', domain="['|', ('product_id', '=', product_id), ('product_tmpl_id.product_variant_ids','=', product_id)]")
workcenter_id = fields.Many2one('mrp.workcenter', string='Work Center')
valid_until = fields.Date('Validity Date', default=_default_valid_until, required=True)
routing_id = fields.Many2one('mrp.routing', string='Routing')