[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:
Denis Ledoux 2014-11-26 12:28:45 +01:00
parent 34da02e730
commit e2dd18f1e7
1 changed files with 1 additions and 1 deletions

View File

@ -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]