fixed bug: if phantom product does not BOM component, it's should be added in production's move lines on computing production order
bzr revid: hmo@tinyerp.com-20090119051239-bplvlcox3ufjtiur
This commit is contained in:
parent
54540f9ae8
commit
3a240624d0
|
@ -258,15 +258,17 @@ class mrp_bom(osv.osv):
|
|||
factor = bom.product_rounding
|
||||
result = []
|
||||
result2 = []
|
||||
phantom=False
|
||||
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:
|
||||
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]
|
||||
phantom=True
|
||||
else:
|
||||
return [],[]
|
||||
else:
|
||||
phantom=False
|
||||
if not phantom:
|
||||
if addthis and not bom.bom_lines:
|
||||
result.append(
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue