From 0e34d1d2efc976813f0a24f2452df14715461d9e Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Tue, 19 Oct 2010 18:14:35 +0530 Subject: [PATCH] [FIX] Account : Corrections on onchange which can return None to client bzr revid: jvo@tinyerp.com-20101019124435-fmwxwn53hri4s93z --- addons/account/account_analytic_line.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index f3c2b71122f..633cb09d976 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -110,7 +110,7 @@ class account_analytic_line(osv.osv): amount_unit = prod.price_get('list_price', context)[prod_id] if not company_id: - company_id=company_obj._company_default_get(cr, uid, 'account.analytic.line', context) + company_id = company_obj._company_default_get(cr, uid, 'account.analytic.line', context=context) flag = False # Compute based on pricetype product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context) @@ -130,9 +130,9 @@ class account_analytic_line(osv.osv): result = round(amount, prec) if not flag: result *= -1 - return {'value': { - 'amount': result, - 'general_account_id': a, + return {'value': { + 'amount': result, + 'general_account_id': a, } }