From 8bb46e8b96ff6b8a634ea9fd066351d6253cfbbf Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 26 Mar 2019 09:12:33 +0000 Subject: [PATCH] [FIX] hr_holidays: use api model instead of multi for dashboard Before 1ced3bfca, the get_days_all_request method was called with the context as an argument. As a consequence, because of the api.multi, the first arg is used as the ids of the record. As the id is not used in this method, it was not harmful. With the above mentioned fix, there is no more argument. This causes a traceback when clicking on menu "My Time Off/Dashboard". With this commit, the api.model is used instead, that way, the first arg is not considered as ids. closes odoo/odoo#32119 Signed-off-by: Christophe Monniez (moc) --- addons/hr_holidays/models/hr_leave_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/models/hr_leave_type.py b/addons/hr_holidays/models/hr_leave_type.py index 4497fa45484..9b92f171d9e 100644 --- a/addons/hr_holidays/models/hr_leave_type.py +++ b/addons/hr_holidays/models/hr_leave_type.py @@ -189,7 +189,7 @@ class HolidaysType(models.Model): return result - @api.multi + @api.model def get_days_all_request(self): employee_id = self._get_contextual_employee_id()