[FIX] mrp: fix cost generation when related mrp.workcenter have no product_id set
bzr revid: xal@openerp.com-20120601113503-47k48712j6tvl23j
This commit is contained in:
+2
-2
@@ -799,7 +799,7 @@ class mrp_production(osv.osv):
|
||||
'ref': wc.code,
|
||||
'product_id': wc.product_id.id,
|
||||
'unit_amount': wc_line.hour,
|
||||
'product_uom_id': wc.product_id.uom_id.id
|
||||
'product_uom_id': wc.product_id and wc.product_id.uom_id.id or False
|
||||
} )
|
||||
if wc.costs_journal_id and wc.costs_general_account_id:
|
||||
value = wc_line.cycle * wc.costs_cycle
|
||||
@@ -815,7 +815,7 @@ class mrp_production(osv.osv):
|
||||
'ref': wc.code,
|
||||
'product_id': wc.product_id.id,
|
||||
'unit_amount': wc_line.cycle,
|
||||
'product_uom_id': wc.product_id.uom_id.id
|
||||
'product_uom_id': wc.product_id and wc.product_id.uom_id.id or False
|
||||
} )
|
||||
return amount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user