[FIX] sale_mrp: stock transfer with BoM using variants

`_bom_explode` expects a `product.product`,
not a `product.template`

```
@param product: Select a particular variant of the BoM.
If False use BoM without variants.
```

This `product` attribute is used in the method `_skip_bom_line`,
which get the `attribute_value_ids` of this `product`.
This field `attribute_value_ids` is available on
`product.product` only, not on `product.template`

opw-656061
This commit is contained in:
Denis Ledoux
2015-11-13 15:02:55 +01:00
parent 432f199fd3
commit 217c4842e9
+1 -1
View File
@@ -42,7 +42,7 @@ class SaleOrderLine(models.Model):
if bom.type != 'phantom':
continue
bom_delivered[bom.id] = False
bom_exploded = self.env['mrp.bom']._bom_explode(bom, self.product_id.product_tmpl_id, self.product_uom_qty)[0]
bom_exploded = self.env['mrp.bom']._bom_explode(bom, self.product_id, self.product_uom_qty)[0]
for bom_line in bom_exploded:
qty = 0.0
for move in self.procurement_ids.mapped('move_ids'):