[FIX] hr_payroll: generate payslips sets the employee company
In a multi-company environment, if a user in company A created a Payslips batch for an employee in the company B and used the `generate payslips` button, the created payslip was set with the user company (A) while it must be the employee company (B). opw-1820138
This commit is contained in:
@@ -46,6 +46,7 @@ class hr_payslip_employees(osv.osv_memory):
|
||||
'date_from': from_date,
|
||||
'date_to': to_date,
|
||||
'credit_note': credit_note,
|
||||
'company_id': emp.company_id.id,
|
||||
}
|
||||
slip_ids.append(slip_pool.create(cr, uid, res, context=context))
|
||||
slip_pool.compute_sheet(cr, uid, slip_ids, context=context)
|
||||
|
||||
Reference in New Issue
Block a user