[FIX] hr_work_entry_contract: allow Payroll Manager to access work entries
A Payroll Manager couldn't access the work entries of their own employees as they couldn't write the work entries generation date on the employee's contract. task-3014915 closes odoo/odoo#104113 X-original-commit: d6a5909f988568581c2ec5b3f83271863be85fc4 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -24,6 +24,6 @@ class HrEmployee(models.Model):
|
||||
contracts_by_company[contract.company_id] |= contract
|
||||
|
||||
for company, contracts in contracts_by_company.items():
|
||||
new_work_entries = bool(contracts.with_company(company)._generate_work_entries(
|
||||
new_work_entries = bool(contracts.with_company(company).sudo()._generate_work_entries(
|
||||
date_start, date_stop, force)) or new_work_entries
|
||||
return new_work_entries
|
||||
|
||||
Reference in New Issue
Block a user