From fabbcf508f0dfedf73b13b4ca73380d5a23c3979 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 4 Jun 2014 18:44:02 +0200 Subject: [PATCH] [FIX] mrp.bom: wrong check for bom_find. If the user defined a bom line type phantom to a product without bom the check is wrong to display the error message. --- addons/mrp/mrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 23033fa0af5..f5b6cf466a5 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -325,8 +325,8 @@ class mrp_bom(osv.osv): }) else: bom_id = self._bom_find(cr, uid, bom_line_id.product_uom.id, product_id=bom_line_id.product_id.id, properties=properties) - bom2 = self.browse(cr, uid, bom_id) - if bom2: + if bom_id: + bom2 = self.browse(cr, uid, bom_id) res = self._bom_explode(cr, uid, bom2, bom_line_id.product_id, factor, properties=properties, level=level + 10, previous_products=all_prod, master_bom=master_bom) result = result + res[0]