Saturday, May 10, 2025
5 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
Miscellaneous changes
Fixes two issue with EMV QR generation: - The regex applied on comments is wrong and actually does nothing. - VietQR allows less character than that general regex, so we filter it more. opw-4671523 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208956
Original PR description
Fixes two issue with EMV QR generation: - The regex applied on comments is wrong and actually does nothing. - VietQR allows less character than that general regex, so we filter it more. opw-4671523 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208956
- Create a vendor bill with two lines at the exact same price. - Set the start and end dates to the same day, but in a different month than the bill date. Then confirm the bill. - In the Deferred Entries, there are only the deferral_moves and no moves_fully_deferred. The method _generate_deferred_entries was refactored by a71c38fa6325cd18c686352d8f68d350461d37d0 . However, inside the loop to remove deferred entries in the same month, the filter is used on move_fully_deferred.deferred_ori
Original PR description
- Create a vendor bill with two lines at the exact same price. - Set the start and end dates to the same day, but in a different month than the bill date. Then confirm the bill. - In the Deferred Entries, there are only the deferral_moves and no moves_fully_deferred. The method _generate_deferred_entries was refactored by a71c38fa6325cd18c686352d8f68d350461d37d0 . However, inside the loop to remove deferred entries in the same month, the filter is used on move_fully_deferred.deferred_original_move_ids.deferred_move_ids which contains deferral_moves + moves_fully_deferred. This means that when there are two lines with the same price, the current moves_fully_deferred is matched with the other in the filtered. This causes both moves_fully_deferred to be removed. opw-4698646 Forward-Port-Of: odoo/enterprise#84776 Forward-Port-Of: odoo/enterprise#83791