From 217c4842e9ea7169a30617facea96ce53542f5d5 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 13 Nov 2015 14:59:03 +0100 Subject: [PATCH] [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 --- addons/sale_mrp/sale_mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_mrp/sale_mrp.py b/addons/sale_mrp/sale_mrp.py index a6b8da72427..41064bafdf9 100644 --- a/addons/sale_mrp/sale_mrp.py +++ b/addons/sale_mrp/sale_mrp.py @@ -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'):