[FIX] sale_timesheet: count timesheet with employees only
Timesheet created using the UI are supposed to all have an employee defined. However, this field is not required and it is possible to have timesheet without a user defined. Feedback ged from saas-16 migration
This commit is contained in:
@@ -59,7 +59,7 @@ class SaleTimesheetController(http.Controller):
|
||||
values['dashboard'] = dashboard_values
|
||||
|
||||
# -- Time Repartition (per employee)
|
||||
repartition_domain = domain + [('timesheet_invoice_type', '!=', False)] # force billable type
|
||||
repartition_domain = domain + [('employee_id', '!=', False), ('timesheet_invoice_type', '!=', False)] # force billable type
|
||||
repartition_data = request.env['account.analytic.line'].read_group(repartition_domain, ['employee_id', 'timesheet_invoice_type', 'unit_amount'], ['employee_id', 'timesheet_invoice_type'], lazy=False)
|
||||
|
||||
# set repartition per type per employee
|
||||
|
||||
Reference in New Issue
Block a user