From 830e73c76082360df75fc68a816da8f6fdaa96c6 Mon Sep 17 00:00:00 2001 From: Olivia Fantinel Date: Thu, 22 Dec 2022 13:36:40 +0000 Subject: [PATCH] [FIX] sale_timesheet: add missing timesheet revenues sequence Before this commit, when the user tries to access to the project update view of a project and at least one timesheet of that project has `timesheet_invoice_type='timesheet_revenues'`, a traceback is occured saying the `timesheet_revenues` does not exist in a dict used for the sequence to display the project profitability in a certain order. This commit adds the missing key in the dict and also in the label displayed in the project profitability. closes odoo/odoo#108585 X-original-commit: b9dabf59b0890e875fd1a22ffc6f506138363f83 Signed-off-by: Xavier Bol (xbo) --- addons/sale_timesheet/models/project.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale_timesheet/models/project.py b/addons/sale_timesheet/models/project.py index abf127d7dbf..c2442686903 100644 --- a/addons/sale_timesheet/models/project.py +++ b/addons/sale_timesheet/models/project.py @@ -358,6 +358,7 @@ class Project(models.Model): 'billable_milestones': _lt('Timesheets (Billed on Milestones)'), 'billable_manual': _lt('Timesheets (Billed Manually)'), 'non_billable': _lt('Timesheets (Non Billable)'), + 'timesheet_revenues': _lt('Timesheets revenues'), } def _get_profitability_sequence_per_invoice_type(self): @@ -368,6 +369,7 @@ class Project(models.Model): 'billable_milestones': 3, 'billable_manual': 4, 'non_billable': 5, + 'timesheet_revenues': 6, } def _get_profitability_aal_domain(self):