Merge branch '2.0-jayank-test_case_failed_timesheet' into 'master'

[FIX] project_billing_options test case error

See merge request flectra-hq/flectra!377
This commit is contained in:
Parthiv Patel committed 2021-07-07 08:38:35 +00:00
commit 60a4db4519
1 file changed
+5 -4
@@ -142,11 +142,12 @@ class Project(models.Model):
'time': data_timesheet_invoice_type}
for key, value in res['repartition_employee'].items():
res['repartition_employee'][key].update({
emp_data[key]['type']: emp_data[key]['time']})
if emp_data:
res['repartition_employee'][key].update({
emp_data[key]['type']: emp_data[key]['time']})
res['repartition_employee'][key]['total'] = sum(
[value[inv_type] for inv_type in [*billable_types, 'canceled']])
res['repartition_employee'][key]['total'] = sum(
[value[inv_type] for inv_type in [*billable_types, 'canceled']])
return res