[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) <xbo@odoo.com>
This commit is contained in:
Olivia Fantinel
2022-12-29 10:58:48 +01:00
parent 3331514b16
commit 830e73c760
+2
View File
@@ -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):