Monday, May 12, 2025
17 changes · 18.0
Enhancements to existing features
Performance tests now measure CPU time instead of general elapsed time, making results less affected by other activity on the machine. This should reduce inconsistent test outcomes and improve confidence in performance measurements.
Original PR description
Use `time.process_time_ns` which is not influenced by other processes running on the machine. This allows to have consistent timing and less non-deterministic results. We also switch to the ns version, so that division per record does not loose too much precision for small values. We may need to fallback to `perf_counter_ns` on some systems where the precision is too low. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes an Odoo 18 migration issue in Expenses where a wizard still referenced the old list view setting. Users should now see the intended expense list layout when splitting expenses, avoiding confusing or incorrect screens.
Original PR description
Description of the issue/feature this PR addresses: Incomplete migration to Odoo 18.0 regarding tree_view_ref/list_view_ref --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
When an image is added in a website page by using the `/image` command of the Powerbox, it is not optimized like when the media dialog is used to replace an image. Also, when an image is replaced, the auto-optimization is not always included in the last history step - which makes operations like inserting a new paragraph remove the optimization. This commit makes sure that the `image_changed` event is: - triggered after the new image is inside the DOM - completed before considering we
Original PR description
When an image is added in a website page by using the `/image` command of the Powerbox, it is not optimized like when the media dialog is used to replace an image. Also, when an image is replaced,…
When an image is added in a website page by using the `/image` command of the Powerbox, it is not optimized like when the media dialog is used to replace an image. Also, when an image is replaced, the auto-optimization is not always included in the last history step - which makes operations like inserting a new paragraph remove the optimization. This commit makes sure that the `image_changed` event is: - triggered after the new image is inside the DOM - completed before considering we are done - included in the same history step that applied the media dialog's change. It also avoids recomputing the auto-optimization several times for a single trigger of the event. Steps to reproduce: Scenario 1: - Drop a three columns snippet - Put your cursor after "Feature 1" - Press ENTER - Use the "/image" Powerbox command to add an image that should be resized by the auto-optimization => Image was the original uploaded image. Scenario 2: - Drop a three columns snippet - Double click on an image - Upload/select an image that will be resized by the auto-optimization - Put your cursor after "Feature 1" - Press ENTER => Image's optimization was lost because it happened after the history step was completed. task-4129429 Forward-Port-Of: odoo/odoo#205294 Forward-Port-Of: odoo/odoo#177433
This fix ensures approval purchase lines use the correct purchase unit of measure instead of an incorrect unit identifier. This helps prevent errors or inconsistencies when approved items are converted into purchase-related records.
Original PR description
This commit fixes the bug introduces by this PR: https://github.com/odoo/enterprise/pull/83938 The UOM id must be the purchase UOM id. task-4751991
This fix prevents an error when saving Field Service tasks assigned to employees who do not have a work calendar set. It helps teams create and schedule service tasks more reliably, even when employee records are incomplete.
Original PR description
**Issue:** A traceback error is raised when the assignee of a Field Service task has no calendar **Steps to reproduce:** - Make sure admin (Michel Admin) has no calendar in the Employee module - Field Service > New - Create a new task with Michel Admin as assignee and click save without choosing Planned Date and leave Allocated Hours at 0 - Choose Planned Date then click save again A traceback error is raised opw-4672980
Spreadsheet pages now show a compact back arrow instead of full breadcrumbs on smaller screens. This saves space so users can still see the spreadsheet name clearly when working on mobile or narrow displays.
Original PR description
The redesign of the spreadsheet layout did not account for the small screen mode. Mor specifically, the breadcrumbs can be reduded to a "previous arrow" to spare some space to display the spreadsheet name. task-4774806
This fixes the employee dashboard filters so they again apply the correct company rules and include departed employees as intended. It prevents HR reporting figures from being skewed by a prior filter change that removed the departure reason condition.
Original PR description
Commit e33522cdc8fcc52 wrongly fixed the first domain of the three. `departure_reason_id` clause disapeared and the active=False was changed to active in [true,false]
The Attendance Gantt view now calculates flexible schedule progress using the actual selected date range, without adding an extra day. This prevents misleading progress totals such as showing expected hours over 11 days when the range is shorter, improving accuracy for managers reviewing attendance.
Original PR description
### Steps to reproduce: - Create an employee with flexible schedule with 8 hours per day - Navigate to Attendance app -> Gantt View - Check the progress bar for the flexible employee - Notice the progress bar will show X/11 ### Cause: This is happening as when calculating the maximum value for the employee's working hours we are adding a day to the date range https://github.com/odoo/enterprise/blob/2da6836520c4e7760e57062e3e97a22b744baacf/hr_attendance_gantt/models/hr_attendance.py#L47 ### Fix: We don't need to add this extra day as already the difference between the start and stop is relfecting the correct number of days opw-4680513
The Hong Kong payroll MPF export now handles employees who do not have a Manulife account number or surname entered. This prevents report generation from failing and lets payroll teams produce the required Manulife MPF report as expected.
Original PR description
Steps to reproduce: - Setup an employee with identification_id, and l10n_hk_given_name - Leave l10n_hk_mpf_manulife_account and l10n_hk_surname empty - Generate Manulife MPF report with any payslips Current behavior: - Error raised Expected behavior: - Should be able to generate the report
**Current behavior before PR:** - Clicking the reset color button did not remove the applied gradient color. **Desired behavior after PR is merged:** - The reset color button now correctly removes the gradient color when clicked. task: 4735054 Forward-Port-Of: odoo/odoo#206778
Original PR description
**Current behavior before PR:** - Clicking the reset color button did not remove the applied gradient color. **Desired behavior after PR is merged:** - The reset color button now correctly removes the gradient color when clicked. task: 4735054 Forward-Port-Of: odoo/odoo#206778
# Context Building on a recent PR (https://github.com/odoo/odoo/pull/188697), we introduce multiple small tweaks to enhance the life of support agents and system admins that work a lot with the log files in the the context of email related issues. # Changes * A given `mail.mail` record being processed by the `_send` method can end up sending multiple emails under the hood ( if `recipient_ids` points to muliple ids). This means that the ratio between one `mail.mail` record and the number
Original PR description
# Context Building on a recent PR (https://github.com/odoo/odoo/pull/188697), we introduce multiple small tweaks to enhance the life of support agents and system admins that work a lot with the log…
# Context Building on a recent PR (https://github.com/odoo/odoo/pull/188697), we introduce multiple small tweaks to enhance the life of support agents and system admins that work a lot with the log files in the the context of email related issues. # Changes * A given `mail.mail` record being processed by the `_send` method can end up sending multiple emails under the hood ( if `recipient_ids` points to muliple ids). This means that the ratio between one `mail.mail` record and the number of email sent through SMTP is not always 1:1. We added a new log line that counts the total emails processed in the loop which should give a more precise estimation of the real number of emails attempted through SMTP * Given the above, we the usual log line was not reporting all the (redacted) list of email addresses but only the `email_to` of the last `msg` value created during the inner loops. We now correctly show a comma seperated list of all recipients in a given batch. * The historical log line `Sent batch %s emails via mail server ID #%s` could be missleading as it was not counting the number of emails but the number of `mail.mail` records processed. It was reformulated to account for this. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#206657
Currently, an exception is raised when a user attempts to import an attachment with an invalid TypeCode in the XML file. Steps to Reproduce: 1. Install the `account_edi_ubl_cii` module. 2. Navigate to Invoice Module -> Customers -> Invoices. 3. Attempt to upload an attachment with an invalid TypeCode in the XML file. 4. An error occurs. Error: `TypeError cannot unpack non-iterable NoneType object ` This issue [1] occurs when a user imports an attachment with an invalid TypeCode
Original PR description
Currently, an exception is raised when a user attempts to import an attachment with an invalid TypeCode in the XML file. Steps to Reproduce: 1. Install the `account_edi_ubl_cii` module. 2. Navigate…
Currently, an exception is raised when a user attempts to import an attachment with an invalid TypeCode in the XML file. Steps to Reproduce: 1. Install the `account_edi_ubl_cii` module. 2. Navigate to Invoice Module -> Customers -> Invoices. 3. Attempt to upload an attachment with an invalid TypeCode in the XML file. 4. An error occurs. Error: `TypeError cannot unpack non-iterable NoneType object ` This issue [1] occurs when a user imports an attachment with an invalid TypeCode in the XML file [2]. The function returns None, which cannot be assigned to multiple variables, leading to an error. [1] - https://github.com/odoo/odoo/blob/29206fb5f9c733ec8751d8d4910e4df686f29506/addons/account_edi_ubl_cii/models/account_edi_common.py#L262 [2] - https://drive.google.com/file/d/1Ww1D302rvMwM2OQBAZJNnTcI0n0xUGWQ/view This fix resolves the issue by ensuring that if an invalid move_type_code is found, it returns None, None, preventing the error. sentry-6303716506 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208821 Forward-Port-Of: odoo/odoo#197927
In this PR: ## [FIX] tools: don't export attributes that aren't translated anyway PR #162079 made the list of translated attributes shared between QWeb and OWL templates. In hindsight, this was not a good idea, since: - some attributes are exclusive to QWeb (e.g.: string) - t-attf- variants of attributes are not translated in OWL - it does not reflect the list of attributes that OWL actually translates ## [IMP] tools: add missing ARIA attributes to OWL_TRANSLATED_ATTRS https://github
Original PR description
In this PR: ## [FIX] tools: don't export attributes that aren't translated anyway PR #162079 made the list of translated attributes shared between QWeb and OWL templates. In hindsight, this was not a…
In this PR: ## [FIX] tools: don't export attributes that aren't translated anyway PR #162079 made the list of translated attributes shared between QWeb and OWL templates. In hindsight, this was not a good idea, since: - some attributes are exclusive to QWeb (e.g.: string) - t-attf- variants of attributes are not translated in OWL - it does not reflect the list of attributes that OWL actually translates ## [IMP] tools: add missing ARIA attributes to OWL_TRANSLATED_ATTRS https://github.com/odoo/owl/pull/1679 made human-readable ARIA attributes translated by Owl. This commit updates OWL_TRANSLATED_ATTRS so that ARIA attributes are also correctly exported for translation, and will therefore be fully translatable when the next version of Owl is released. ## [IMP] tools: make 'confirm-label' and 'cancel-label' translatable 'cancel-label' and 'confirm-label' are missing from the list of attributes to export for translation. This commit adds them to the list. Forward-Port-Of: odoo/odoo#208861 Forward-Port-Of: odoo/odoo#204692
to reproduce: =========== step 1 : change language to arab step 2 : go to dashboard app using mobile Problem: ======= overlapped text in the Dashboard module we forced direction to ltr on all languages in web and we didn't add this change in the mobile part Solution: ======= force ltr direction even on rtl languages in the mobile part opw-4586743 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of
Original PR description
to reproduce:
===========
step 1 : change language to arab
step 2 : go to dashboard app using mobile
Problem:
=======
overlapped text in the Dashboard module
we forced direction to ltr on all languages in web and we didn't add this change in the mobile part
Solution:
=======
force ltr direction even on rtl languages in the mobile part
opw-4586743
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#208977**Current behavior:** Scanning a package type in an MO in barcode while having a raw move line (component line) selected will result in a traceback. **Expected behavior:** Put the comp line in a new pack of that package type. **Steps to reproduce:** 1. Make a packge type 2. Make a new MO -> open it in barcode 3. Scan some component, select the new line 4. Scan the barcode of the package type -> traceback **Cause of the issue:** We end up calling `action_put_in_pack` when `
Original PR description
**Current behavior:** Scanning a package type in an MO in barcode while having a raw move line (component line) selected will result in a traceback. **Expected behavior:** Put the comp line in a new pack of that package type. **Steps to reproduce:** 1. Make a packge type 2. Make a new MO -> open it in barcode 3. Scan some component, select the new line 4. Scan the barcode of the package type -> traceback **Cause of the issue:** We end up calling `action_put_in_pack` when `this.resModel` is `MrpProduction` (which does not define this method). **Fix:** Define the method for the barcode MRP model to display a notification to, rather, scan a product (scanning a package here doesn't make sense). opw-4564834 Forward-Port-Of: odoo/enterprise#84178 Forward-Port-Of: odoo/enterprise#81374
Steps: - Have a main company C with a branch B - Select B in company selector, but have C checkbox checked too - Create a user U with `company_id == B` - Create and confirm an invoice I for user U, company_id should be B, amount X - Go back to accounting dashboard, and open reconciliation widget - Create a new transaction, amout X - Select it, select line from I and click on Validate -> UserError: "Incompatible companies on records" This reason is, even if we have Branch company sele
Original PR description
Steps: - Have a main company C with a branch B - Select B in company selector, but have C checkbox checked too - Create a user U with `company_id == B` - Create and confirm an invoice I for user U, company_id should be B, amount X - Go back to accounting dashboard, and open reconciliation widget - Create a new transaction, amout X - Select it, select line from I and click on Validate -> UserError: "Incompatible companies on records" This reason is, even if we have Branch company selected as `env.company`, as we have Main company checked too, the statement line is created with `company_id == main company` With this commit, we unset the partner from the statement line's move if it is from an accessible branch but not the main company. We also test different usecases to secure the flow. opw-4626664 Forward-Port-Of: odoo/enterprise#82896
The system fails when `ir. qweb. _ render ()` is called with a `values` argument that is not a dictionary but a `Response ' object. Steps to Produce: 1. Open `Sign` Module > Templates > Click on the `Sign Now` button of any template. 2. Copy url > delete sign reques > paste url in websie 3. The error will be visible on the terminal. Error: `AttributeError: 'Response' object has no attribute 'copy'` Solution: - Updated `get_document()` to check if `context` is not a `dict`. - If no
Original PR description
The system fails when `ir. qweb. _ render ()` is called with a `values` argument that is not a dictionary but a `Response ' object. Steps to Produce: 1. Open `Sign` Module > Templates > Click on the `Sign Now` button of any template. 2. Copy url > delete sign reques > paste url in websie 3. The error will be visible on the terminal. Error: `AttributeError: 'Response' object has no attribute 'copy'` Solution: - Updated `get_document()` to check if `context` is not a `dict`. - If not, the method now safely returns `request.not_found()`. sentry - 6521023695 Forward-Port-Of: odoo/enterprise#82936