diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index a28508be4db..cd0f873ccfd 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -154,7 +154,7 @@ class hr_analytic_timesheet(osv.osv): 'date': lambda self, cr, uid, ctx: ctx.get('date', fields.date.context_today(self,cr,uid,context=ctx)), 'user_id': lambda obj, cr, uid, ctx: ctx.get('user_id', uid), } - def on_change_account_id(self, cr, uid, ids, account_id): + def on_change_account_id(self, cr, uid, ids, account_id, user_id): return {'value':{}} def on_change_date(self, cr, uid, ids, date): diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index b9574b553d1..d4950708294 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): + def on_change_account_id(self, cr, uid, ids, account_id, user_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 bec3c641776..887ce15a741 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)) for el in account_ids]) + return dict([(el, self.on_change_account_id(cr, uid, ids, el, context.get('user_id', False) or uid)) for el in account_ids]) hr_timesheet_line()