[FIX] mrp: prevent recursion from phantom boms with no lines
if the bom is phantom and has no line, we attempt to find a new bom with the default product uom This is possible that we find the same bom that the current one In such a case, we must not explode, to avoid recursion.
This commit is contained in:
parent
34da02e730
commit
e2dd18f1e7
|
@ -334,7 +334,7 @@ class mrp_bom(osv.osv):
|
|||
if bom.type == 'phantom' and not bom.bom_lines:
|
||||
newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties)
|
||||
|
||||
if newbom:
|
||||
if newbom and newbom != bom.id:
|
||||
res = self._bom_explode(cr, uid, self.browse(cr, uid, [newbom])[0], factor*bom.product_qty, properties, addthis=True, level=level+10)
|
||||
result = result + res[0]
|
||||
result2 = result2 + res[1]
|
||||
|
|
Loading…
Reference in New Issue