[IMP]Account:analytic line adding product doesnt add the unit of measure
bzr revid: ron@tinyerp.com-20110221122945-oe29d7jzbusvgvn8
This commit is contained in:
parent
753eddd26f
commit
6c9834f0d5
|
@ -80,11 +80,10 @@ class account_analytic_line(osv.osv):
|
|||
j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
|
||||
prod = product_obj.browse(cr, uid, prod_id, context=context)
|
||||
result = 0.0
|
||||
product_uom_id=False
|
||||
if prod_id:
|
||||
product_uom_id = prod.uom_id.id
|
||||
if prod_id or not unit:
|
||||
unit = prod.uom_id.id
|
||||
if j_id.type == 'purchase':
|
||||
product_uom_id = prod.uom_po_id.id
|
||||
unit = prod.uom_po_id.id
|
||||
if j_id.type <> 'sale':
|
||||
a = prod.product_tmpl_id.property_account_expense.id
|
||||
if not a:
|
||||
|
@ -131,7 +130,7 @@ class account_analytic_line(osv.osv):
|
|||
return {'value': {
|
||||
'amount': result,
|
||||
'general_account_id': a,
|
||||
'product_uom_id':product_uom_id
|
||||
'product_uom_id':unit
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue