hr: cost calculation for price: zero products in timesheet

lp bug: https://launchpad.net/bugs/849603 fixed

bzr revid: bde@tinyerp.com-20110928061921-iths10cslnehylur
This commit is contained in:
Bharat (OpenERP)
2011-09-28 11:49:21 +05:30
parent bdfaf1e37d
commit 1735e48887
+1 -1
View File
@@ -123,7 +123,7 @@ class account_analytic_line(osv.osv):
ctx['uom'] = unit
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
amount = amount_unit * quantity or 1.0
amount = amount_unit * quantity
result = round(amount, prec)
if not flag:
result *= -1