From e2a28b011ad70ad3cfb1c8d4ba6c65ac5df89201 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 10 Oct 2012 20:38:49 +0530 Subject: [PATCH] [FIX]: Fix on_change_analytic_id problem bzr revid: atp@tinyerp.com-20121010150849-u4cldadvfjzmw8mj --- addons/analytic_user_function/analytic_user_function.py | 2 +- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 7e4d00ef095..9c84b75b293 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -66,7 +66,7 @@ class hr_analytic_timesheet(osv.osv): - def on_change_account_id(self, cr, uid, ids, account_id, user_id, unit_amount=0): + def on_change_account_id(self, cr, uid, ids, account_id, user_id=False, unit_amount=0): res = {} if not (account_id): #avoid a useless call to super diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index d4950708294..b9574b553d1 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -174,7 +174,7 @@ account_analytic_line() class hr_analytic_timesheet(osv.osv): _inherit = "hr.analytic.timesheet" - def on_change_account_id(self, cr, uid, ids, account_id, user_id): + def on_change_account_id(self, cr, uid, ids, account_id): res = {} if not account_id: return res diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 32fbf978175..bec3c641776 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -389,7 +389,7 @@ class hr_timesheet_line(osv.osv): return True def multi_on_change_account_id(self, cr, uid, ids, account_ids, context=None): - return dict([(el, self.on_change_account_id(cr, uid, ids, el, context.get('user_id', uid))) for el in account_ids]) + return dict([(el, self.on_change_account_id(cr, uid, ids, el)) for el in account_ids]) hr_timesheet_line() diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 28e886b779f..7dd2b9a1b88 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -97,7 +97,7 @@ - + @@ -110,7 +110,7 @@
- +