From 1735e48887c52f87c3d941b6bf370b65c79f034f Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Wed, 28 Sep 2011 11:49:21 +0530 Subject: [PATCH] hr: cost calculation for price: zero products in timesheet lp bug: https://launchpad.net/bugs/849603 fixed bzr revid: bde@tinyerp.com-20110928061921-iths10cslnehylur --- addons/account/account_analytic_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 08123c8f460..85b914bc3ad 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -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