From 12c1993e03c5cd5b817da3433f1f4ea27455e423 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 27 Aug 2015 22:09:13 +0200 Subject: [PATCH] [FIX] hr_timesheet_invoice: Call super on on_change_account_id of hr.analytic.timesheet `hr_timesheet_invoice.py` overrides `on_change_account_id` of model `hr.analytic.timesheet`. The super call wasn't done, probably because this on_change method in the base model was trivial: `return {'value':{}}` Nevertheless, if another module overrides this on_change, according to the module dependences, this method could have been called first in the calling chain, discarding the changes from the other overriden `on_change_account_id` methods, preventing any customization in this on_change according to the current database state. Closes #8248 --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index fa895c7e7a9..db8ab48cdda 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -320,7 +320,8 @@ class account_analytic_line(osv.osv): class hr_analytic_timesheet(osv.osv): _inherit = "hr.analytic.timesheet" def on_change_account_id(self, cr, uid, ids, account_id, user_id=False): - res = {} + res = super(hr_analytic_timesheet, self).on_change_account_id( + cr, uid, ids, account_id, user_id=user_id) if not account_id: return res res.setdefault('value',{})