From 6ce9dec0138d246229f3cff7f7d7db5157ebb803 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Mon, 1 Feb 2010 14:17:36 +0530 Subject: [PATCH] [FIX] Analytic_user_function : Corrected the Wrong way call to the method of product.uom bzr revid: jvo@tinyerp.com-20100201084736-kj4if8506grjy8gz --- addons/analytic_user_function/analytic_user_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 3c8972f4df9..16d0f01a7de 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -132,7 +132,7 @@ class hr_analytic_timesheet(osv.osv): _('There is no expense account define ' \ 'for this product: "%s" (id:%d)') % \ (r.product_id.name, r.product_id.id,)) - amount = unit_amount * r.product_id.uom_id._compute_price(cr, uid, + amount = unit_amount * self.pool.get('product.uom')._compute_price(cr, uid, r.product_id.uom_id.id, r.product_id.standard_price, False) res ['value']['amount']= - round(amount, 2) res ['value']['general_account_id']= a