Saturday, May 10, 2025
3 changes · 18.0
Resolved issues and error corrections
This fixes an issue where some time off allocations could miss their latest relevant date value. It helps keep allocation information complete and reliable for HR users reviewing leave balances.
Original PR description
actual_lastcall was being false because it wasn't set in one case inside `add_lastcalls` method. This commit fixes this issue.
Scheduled automations using date-based filters such as “is within the last month” could fail because the server did not recognize some date helpers created by the interface. This fix lets those automations evaluate the filters properly, reducing missed or silently failed automated actions.
Original PR description
# Bug: Currently, base automations that use filters constructed by the front-end using `context_today` and `relativedelta` will fail. These are for example constructed when using the "is within"…
# Bug:
Currently, base automations that use filters constructed by the front-end using `context_today` and `relativedelta` will fail.
These are for example constructed when using the "is within" operator for filter domains, producing search domains like: "Created on is within -1 months"
```
["&", ("create_date", ">=", datetime.datetime.combine(context_today() +
relativedelta(months = -1), datetime.time(0, 0, 0)).to_utc().strftime("%Y-%m-%d %H:%M:%S")),
("create_date", "<=", datetime.datetime.combine(context_today(),
datetime.time(0, 0, 0)).to_utc().strftime("%Y-%m-%d %H:%M:%S"))]
```
When running the CRON for the automation rules, it will silently fail throwing a `NameError: name 'context_today' is not defined` error.
# Proposed solution:
Extend the `eval_context` dictionary in `_get_eval_context` to whitelist the needed methods to resolve such filter domains. Additionally replace `.to_utc()` calls that only make sense when evaluating the filter domain in thre front-end JS
opw-4763409
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe Salary Register now only retrieves payslips for the company currently being viewed. This prevents access errors in multi-company India payroll setups and lets users review payroll reports without being blocked by records from another company.
Original PR description
Problem: In a multi-company environment with multiple companies from India, users are getting access right errors about being unable to read employees from Company B when viewing the Salary Register from Company A and vice versa. Steps to Reproduce on Runbot: 1. Install accounting,employee, payroll, India payroll 2. Create 2 Indian companies with India fiscal package 3. Create an employee per company and create payslips per employee and pay them 4. View the salary register in Payroll > Reporting --> access right error thrown opw-4677551