Daily updates from Odoo
Tuesday, March 24, 2026
256 changes
18 changes
Resolved issues and error corrections
A bug in the composer was causing a technical error when users selected mentions (@). This was due to an outdated reference to an old attribute name. This update corrects the code to properly handle mentions, ensuring the composer functions smoothly for all users.
Original PR description
Problem: Opening the composer, typing "@" and selecting any item causes a traceback. Cause: After 8c99b17fcc3a612fd897da9ee29e2f53254d5933, the attribute `channel` was renamed to `thread`. Some code still referenced the old `channel` attribute, leading to errors when selecting mentions. Steps to reproduce: - Open the composer. - Type "@" to trigger mentions. - Select any item from the suggestions. - Observe a traceback. opw-6030307 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254127
This update corrects a bug where invoices were displaying the delivery date one day in the past. The fix addresses a timezone mismatch during invoice creation, ensuring the correct delivery date is reflected based on the system's time. This improves data accuracy for sales reporting and customer invoicing.
Original PR description
Currently when the user creates an invoice the delivery date is set incorrectly. <h2>Steps to produce:</h2> * Set system timezone to Asia/Kolkata and time to 5:00 * Install Sales, Inventory * Create…
Currently when the user creates an invoice the delivery date is set incorrectly. <h2>Steps to produce:</h2> * Set system timezone to Asia/Kolkata and time to 5:00 * Install Sales, Inventory * Create and confirm a sale order * Go to Delivery and Validate the delivery * Go back to the Sale order and create an invoice. <h2>Observed Behavior:</h2> The delivery date on the customer invoice is set to one day before the current date, even though the effective date for the delivery correctly reflects the system date and time. <h2>Root cause:</h2> This issue occurs because, when a delivery is validated, the `date_done` field is set using the current time in UTC at [1], because odoo operates in UTC by default. This value is then used to compute the effective date on the sales order at [2], which in turn is used to determine the delivery date on the invoice at [3] and [4]. Users see the effective date on the delivery in their own timezone because `Datetime` fields are converted from UTC to the user’s timezone on the client side as stated in [5]. However problem arises from a type mismatch. The delivery date field is of type `Date`, while the effective date is a `Datetime`. As a result, when the value is assigned at [3] or at [4], only the date portion is passed. Because a Date field does not carry any timezone information, no timezone conversion occurs, leading to the observed discrepancy. [1]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/stock/models/stock_picking.py#L1274 [2]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/sale_order.py#L87-L88 [3]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/account_move.py#L122 [4]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/sale_order.py#L301 [5]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/odoo/orm/fields_temporal.py#L214-L217 ## **Solution:** Using the `context_timestamp` function makes it possible to work with the `Datetime` in the client’s timezone, which can then be used to correctly assign the delivery date on the invoice. opw-5391189 Forward-Port-Of: odoo/odoo#255404 Forward-Port-Of: odoo/odoo#247122
This update allows users to reverse previously scrapped stock moves, expanding flexibility in inventory management. Previously, this functionality was limited, impacting the ability to correct errors or adjust quantities accurately. This change improves inventory accuracy and streamlines operational workflows.
Original PR description
This commit enables reverting a scrapped move. Previously, it was only possible to revert inventory adjustment moves and commit https://github.com/odoo/odoo/commit/1c7d80a10b5d7db1c4163166bf52b3f3c77044ba was supposed to add the ability in. Task: 6001058
This update resolves an issue preventing the hover effect for Bento product designs within the website editor. The previous version had an incorrect variable reference, which was corrected in this commit. This ensures that users can now properly view and hide product descriptions when hovering over Bento designs.
Original PR description
During the introduction of the Bento product design in commit [1], a specific hover effect to show and hide the description was implemented. However, due to an incorrect reference to the 'catalog' variable, this feature was not available in the editor. This commit updates the variable to the correct one, enabling the feature in the editor. [1]: https://github.com/odoo/odoo/commit/1739b954fa34bc62223d892f2cdacbccebd5f8a2 task-6051497 | Current | This branch | |--------|--------| | <img width="1792" height="836" alt="Capture d’écran 2026-03-19 à 14 29 16" src="https://github.com/user-attachments/assets/7a900d47-73b4-4c35-b51e-8ff847361f0b" /> | <img width="1785" height="901" alt="Capture d’écran 2026-03-19 à 14 16 30" src="https://github.com/user-attachments/assets/eb5312bd-04dd-4acb-a44b-fc500b89ddda" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254886
This update resolves an error that occurred when returning inventory with a zero quantity on the original move. The fix ensures that returns with no quantity are properly valued at zero, preventing calculation errors in inventory valuations. This improves the accuracy of financial reporting.
Original PR description
An error is raised when we try to acces the inventory valuation if a move has been returned and the quantity set on the original move is changed to 0 Steps to reproduce: 1. Install Accounting and…
An error is raised when we try to acces the inventory valuation if a move has been returned and the quantity set on the original move is changed to 0 Steps to reproduce: 1. Install Accounting and Inventory 2. Create a product called "Product" and set the Category to "Goods" 3. Go to Inventory > Configuration > Categories, open category "Goods" and change the costing method to "Average Cost (AVCO)" 4. Go to Inventory > Operations > Deliveries and create a new delivery for any customer with one of product "Product" 5. Validate the delivery, click on "Return" then on "Return All" 6. Validate the return 7. Go back to the original delivery and in Actions, click on "Lock/Unlock" 8. Set the quantity to 0 and save 9. Go to Accounting > Review > Inventory valuation 10. Change the day to any day after today 11. An error is raised Issue: Trying to get the inventory valuation at another day then today will replay the history https://github.com/odoo/odoo/blob/88df50bc96448dfaff28bd37e970ffd18bf8d554/addons/stock_account/models/product.py#L444-L450 Which will call `_get_value()` on the moves related to the product https://github.com/odoo/odoo/blob/88df50bc96448dfaff28bd37e970ffd18bf8d554/addons/stock_account/models/stock_move.py#L388-L391 A ZeroDivisionError will then be raised when trying to get the value of a return move and the original move's quantity is 0 https://github.com/odoo/odoo/blob/873d4d262ed3e85362aa677b5a782d6e7fa00f09/addons/stock_account/models/stock_move.py#L457 Solution: If the original move's quantity is 0, set the value to 0 This ensures the move is valued at 0 if the move has no quantity. In other words, a move that has no quantity shouldn't be considered to have any value as there really is nothing to value. opw-5980600 Forward-Port-Of: odoo/odoo#253392
This update resolves issues with how overtime calculations handle different time zones, specifically preventing crashes and ensuring overtime lines are correctly deleted. The fix ensures accurate overtime intervals are generated and processed, regardless of the employee's location.
Original PR description
Steps to reproduce (singleton crash): Create an employee in a UTC+ timezone (e.g. Asia/Shanghai or Australia/Adelaide) with an overtime ruleset containing a paid rule. Generate work entries for a…
Steps to reproduce (singleton crash): Create an employee in a UTC+ timezone (e.g. Asia/Shanghai or Australia/Adelaide) with an overtime ruleset containing a paid rule. Generate work entries for a period, then create two consecutive midnight-to-midnight attendances in the employee's local timezone. Creating the second attendance crashes with: "ValueError: Expected singleton: hr.attendance.overtime.line(...)". Steps to reproduce (stale overtime lines): With the same setup, delete the attendance after it generated overtime lines. The overtime lines remain in the database instead of being removed. The singleton crash occurred because `end_of_day` in `_get_overtime_intervals` was computed as a naive datetime, implicitly treated as UTC. For UTC+ timezones, the actual local end of day is earlier than UTC midnight. As a result, overtime intervals were computed with a stop time extending past the real local midnight into UTC time. When consecutive attendances were processed together, these extended intervals overlapped. The `Intervals` class (`keep_distinct=True`) merges overlapping intervals into a single entry with a multi-record recordset as payload. The subsequent `overtime.rule_ids.work_entry_type_id` and `overtime.status` calls expected a singleton but received a multi-record set, causing the crash. The same multi-record issue also affected the iteration in `_set_real_overtime_intervals` and the overtime work entry loop in `_get_attendance_intervals`. The stale overtime lines issue occurred because `_get_overtimes_to_update_domain` built its search date range from raw UTC `.date()` values instead of the employee's local timezone. For UTC+ employees whose attendance spans local midnight, the overtime line is dated in the next local calendar day. Since the domain was derived from UTC dates, that next local day fell outside the search range, so the overtime line was never found and deleted when the attendance was removed. Additionally, `_get_localized_times` called `.astimezone()` on naive UTC datetimes without first localizing them, producing incorrect local times for the same reason. Solution: - In `_get_overtimes_to_update_domain`, localize check_in/check_out to the employee's timezone before computing the overtime search date range (with a ±1 day buffer) so overtime lines for dates that only exist in local time are correctly included in the delete-and-recreate cycle. - Fix `_get_localized_times` to call `utc.localize()` on naive UTC datetimes before converting to the employee's timezone. opw-5931665 Forward-Port-Of: odoo/odoo#254543 Forward-Port-Of: odoo/odoo#251812
This update resolves an issue where button colors were inconsistently applied across different themes. Specifically, the contrast-adjusted colors previously used for button outlines were incorrectly applied when users manually selected colors. Now, manual color selections are used directly, ensuring a consistent and visually appealing button experience.
Original PR description
Previously, we created a contrast-adjusted color for the `btn-outline` classes to ensure readability. This was also applied to manual colors selected via Theme tab, which made some inconsistencies…
Previously, we created a contrast-adjusted color for the `btn-outline` classes to ensure readability. This was also applied to manual colors selected via Theme tab, which made some inconsistencies with standard `btn`. This commit fixes that by providing the contrast-adjusted color only on default palettes, and use the manual color as is when selected in the Theme tab. task-5392258 | State | Before | After | |--------|--------|--------| | Normal | <img width="261" height="122" alt="image" src="https://github.com/user-attachments/assets/482ed97f-303c-4332-a748-1130a9ee5db7" /> | <img width="261" height="124" alt="image" src="https://github.com/user-attachments/assets/5e0b14ba-677a-480e-8aad-85c13f3a5f6e" /> | | Hover | <img width="261" height="124" alt="image" src="https://github.com/user-attachments/assets/87cec4fc-521c-4b36-84d3-81460cefa68c" /> | <img width="259" height="123" alt="image" src="https://github.com/user-attachments/assets/b17c309d-2b64-4dc2-a33b-e576831647e0" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239584
This update ensures that presence status notifications are sent only after a user's presence record is removed from the system. Previously, notifications were sent with outdated information, leading to incorrect status updates. This change guarantees accurate and reliable presence status broadcasts for users.
Original PR description
Before this commit, presence channel notifications for unlinked records were sent before the records were actually removed from the database. This caused `im_status` to be calculated using stale data, occasionally resulting in statuses other than "offline" being broadcast. This commit ensures notifications are sent only after the presences have been unlinked, guaranteeing an accurate status. Forward-Port-Of: odoo/odoo#254186 Forward-Port-Of: odoo/odoo#249314
This update fixes a validation issue related to Saudi Arabia's ZATCA tax reporting. Previously, the system didn't include invoice cash rounding amounts in the payable calculation, leading to validation errors. This change ensures accurate VAT calculations and prevents invoice validation failures.
Original PR description
Currently the generated ZATCA XML is not accounting for invoice cash rounding, leading to an invoice validation issue due to a mismatch in the calculation of PayableAmount. Steps to reproduce: - Have a SA Company setup - Create a [cash rounding] with strategy 'Add invoice line' and rounding 1.00 (UP) - Create an invoice for 99.55 + 15% Tax - Set Cash Rounding Method to [cash rounding] - Confirm and send xml for validation Issue: Validation will issue the following warning `[202] BR-CO-16 : Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).` Analysis: The ZATCA implementation was calculating the payable amount strictly as (TaxInclusiveAmount - PrepaidAmount). This change ensures the rounding amount is fetched and added to the total payable calculation opw-5939550 Forward-Port-Of: odoo/odoo#255178 Forward-Port-Of: odoo/odoo#253555
This update fixes a bug in the website builder where unfolding a group would reset to its default state after a page reload. The change ensures that user-selected group configurations are maintained, improving the website building experience and preventing data loss.
Original PR description
When the user has unfolded a group, then click on an action that reloads the builder, the groups got folded. This commit preserves the unfolded groups, in a similar way as the target was already preserved. Steps to reproduce: - Open website builder on `/shop` - Click on a product card - Unfold the "Products page" group - Click on a reloading action (for example "Floating") - Bug: the unfolded group is folded after the reload task-5973113
This update ensures that analytic lines created from services and materials within sales orders automatically use the 'Project' plan instead of the standard 'Sales Orders' plan. A new setting allows users to customize this behavior if needed, providing greater flexibility in tracking costs. This change improves reporting accuracy for project-based sales.
Original PR description
This change ensures that analytic lines generated from Services and Materials create analytic accounts per Sale Order under the **Project** plan by default, instead of using the dedicated **Sales Orders** plan. A new system parameter `sale.analytic_plan_sale_orders` has been introduced to allow users to override this behavior and define a custom analytic plan for upsell lines when needed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where a "This question requires an answer" alert incorrectly appeared on survey questions, even when it was the first time a user saw them. With recent changes to survey flow handling, we've refined the alert logic to ensure it only displays when a question is part of the post-submit flow and was genuinely skipped by the user. This improves the survey experience for all users.
Original PR description
Purpose ======= Fix the "This question requires an answer" alert which is displayed under the question even if it's the first time the user sees it. Specification ============= Following…
Purpose ======= Fix the "This question requires an answer" alert which is displayed under the question even if it's the first time the user sees it. Specification ============= Following odoo/odoo#215237 conditional questions can now be displayed in the post-submit flow. The purpose was to give the user the chance to see and answer the conditional questions that are triggered by a mandatory question that was skipped. However the condition to display this error alert was only relying on the fact that the question was considered post-submit or not. But now that the post-submit questions also includes the conditional questions that are waiting for answer, this condition is not enough anymore. Making the condition more precise to be sure that the error is displayed only if the questions is considered post-submit AND it's already the post-submit flow or it's the pre-submit flow and the question was effectively skipped by the user. Task-6048598 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254848
This update resolves an issue preventing standard Inventory users from printing inventory count sheets. The fix adjusts access permissions to allow retrieval of system parameters needed for the report, ensuring all users can generate these reports. This improves usability for all inventory staff.
Original PR description
### Steps to reproduce: - Impersonate a user with only Inventory user access rights - Inventory > Operations > Adjustments> Physical Inventory - Select any quant in the list > Print > Count Sheet…
### Steps to reproduce: - Impersonate a user with only Inventory user access rights - Inventory > Operations > Adjustments> Physical Inventory - Select any quant in the list > Print > Count Sheet #### > Access Error: You are not allowed to access 'System Parameter' (ir.config_parameter) records. ### Cause of the issue: The template of the count sheet relies on the `get_param` methods of the `ir.config_parameter` model which requires read access rights on the model: https://github.com/odoo/odoo/blob/69ec92cd6fd1b5f19c3db8763c12f003c9acf0dd/addons/stock/report/report_stockinventory.xml#L36-L39 https://github.com/odoo/odoo/blob/69ec92cd6fd1b5f19c3db8763c12f003c9acf0dd/odoo/addons/base/models/ir_config_parameter.py#L59-L69 This access right is limited to the the `base.group_system` (admin) user group: https://github.com/odoo/odoo/blob/69ec92cd6fd1b5f19c3db8763c12f003c9acf0dd/odoo/addons/base/security/ir.model.access.csv#L118 opw-5959200 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254294 Forward-Port-Of: odoo/odoo#253251
This update resolves an issue where component consumption wasn't accurately tracked in the manufacturing process. Specifically, a technical glitch was resetting the consumed quantity, leading to incorrect inventory levels. This fix ensures components are properly used during production runs.
Original PR description
# Product Configuration *Manufactured Product* - Storable - Tracked by Quantity - Manufacture Route - Has a BOM with atleast 1 component *Component Product* - Storable - Tracked By Lot # How to…
# Product Configuration
*Manufactured Product*
- Storable
- Tracked by Quantity
- Manufacture Route
- Has a BOM with atleast 1 component
*Component Product*
- Storable
- Tracked By Lot
# How to reproduce
- Ensure there is available stock for the component product in a lot
- Create a MO for the Manufatured Product
- Confirm the MO
- Click "Details" on the component product
- Remove the reserved quant and add a new one
- Increase the quantity of this new quant to more than "To Consume"
- Save
- Observe that "Consumed" = The quantity you just set on the quant
- Click on "Produce All"
# The issue
- The Consumed quantity is reset to the "To Consume" quantity.
- Furthermore, a warning popup should be displayed when clicking on "Produce All" but there is none.
- Finally, depending on the version you may get this error message : "You need to supply Lot/Serial Number for products and 'consume' them: - Component Product" even though a lot is already assigned
# Why
All these issues stem from the fact that move_raw_ids.picked from mrp.production is set to False instead of True.
This issue was introduced by this commit (https://github.com/odoo/odoo/commit/ef592464983d66ac76bc71a9886462f1f47dc28d) that changed the way the picked value is set.
In write(self, vals) de stock_move, we have :
```py
if self.env.context.get('force_manual_consumption') and 'quantity' in vals:
moves_to_update = self.filtered(lambda move: move.product_uom_qty != vals['quantity'])
if moves_to_update:
moves_to_update.write({'manual_consumption': True, 'picked': True})
```
Followed a bit later by :
```py
res = super().write(vals)
```
This usually works fine except when vals contains edition commands for move_line_ids. Then, the first write will correclty set picked to True, but then picked will be reevaluted after the second write with :
```py
@api.depends('move_line_ids.picked', 'state')
def _compute_picked(self):
for move in self:
if move.state == 'done' or any(ml.picked for ml in move.move_line_ids):
move.picked = True
else:
move.picked = False
```
If all the resulting move_line_ids from the commands edition have picked set to False, then move.picked will also be set to False.
opw-5937171
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253607This update resolves an issue where notification reminders failed when attendees had access to companies not visible to the event organizer. The fix ensures that attendee company access is properly checked, preventing access errors and guaranteeing reminders function as expected for all users, regardless of their company affiliations.
Original PR description
[FIX] calendar: use sudo for attendee company access in notifications Invitations with notification reminders fail if the attendee has access to companies hidden from the organizer. ### Reproduction Steps 1. User A (Company 1) invites User B (Company 1 & 2). 2. Add a "Notification" reminder. 3. Saving the event raises an AccessError on res.company. ### Cause When preparing notifications, the attendee's company list is fetched while still in the organizer's environment. The `res.company` record rule restricts visible companies to the organizer's own, so the attendee's extra companies are blocked. Since 9a21edd99e7f, `Many2many.read()` uses `_search()` without `bypass_access`, which explicitly checks read access and raises `AccessError` instead of silently filtering at the SQL level. opw-5916536 Forward-Port-Of: odoo/odoo#253679
This update resolves an issue where creating a project from a template without a linked company would trigger a 'company inconsistencies' error. The fix ensures the customer's company information is correctly applied during project creation, allowing users to seamlessly create projects connected to customers with existing company records. This improves usability and prevents data errors.
Original PR description
### Issue: Creating a project from a template that has no company with a customer who has one results in a "company inconsistencies" error. ### Steps to reproduce: - Install `hr_timesheet` and `project` - Convert a project with no companies and the option "Timesheets" ticked, to a template - Create a new project using the template - In the wizard, input a name and select a customer with a company - Click "Create Project" - An error pops up ### Cause: `hr_timesheet` overrides the `create()` of `project.project` to create an `account.analytic.account` if the project allows timesheet and none is given. During the creation of the analytic account, as the field `partner_id` is `check_company=True`, the error is raised in `_check_company()`. ### Solution: We set the company of the customer on the generated project before building the `analytic_accounts_vals` list. opw-5931994 Forward-Port-Of: odoo/odoo#250150
A bug in Odoo's testing framework was causing it to freeze due to an infinite loop. This has been resolved by switching from an array to a set data structure, which prevents duplicate processing and ensures the testing process completes without errors. This improves the stability of the Odoo system.
Original PR description
Problem: Triggering the `child_of` operator in the testing framework caused an infinite loop that froze Odoo. This occurred because the framework attempted to fetch all children of the root operand without accounting for already visited nodes, resulting in children being added indefinitely. Solution: Switched from using an `array` to `set` to prevent duplicate traversal. Task-6023290 Forward-Port-Of: odoo/odoo#255419 Forward-Port-Of: odoo/odoo#254857
This update corrects an issue where embedded attachments within SDI invoices were overwriting the main XML file, causing import failures. The fix involves storing attachments separately, ensuring data integrity and proper invoice processing. Additionally, the naming convention for attachments has been improved.
Original PR description
PR #212726 removed a Many2One field and used an existing binary field, `l10n_it_edi_attachment_file`, to store E-invoice files as XMLs. This change was made for security reasons. However, this PR…
PR #212726 removed a Many2One field and used an existing binary field, `l10n_it_edi_attachment_file`, to store E-invoice files as XMLs. This change was made for security reasons. However, this PR also stores attachments embedded in the `<Allegati>` element of the XML in this same field. This results in three issues when importing invoices from the SDI: 1. The first embedded attachment will overwrite the XML file's contents, corrupting it. 2. Subsequent embedded attachments will continue to overwrite the previous attachment. 3. All embedded attachments are linked to the `account.move` record by the Many2one field `attachment_ids`, which is contrary to the stated goal of PR #212726. These behaviors cannot be replicated in a runbot environment, as there is no way to test the SDI import process in runbot at the time of writing. Localhost environments can replicate this issue by receiving an XML from the test l10n_it API server, or by passing similarly encrypted data to the method `_l10n_it_edi_process_downloads()`. See the method `test_decrypt_invoice_from_IAP()` from PR #250439 for an example of the encryption process. **Solution**: Do not overwrite the field `l10n_it_edi_attachment_file`. Add stored field(s) to master for attachment(s) within an XML's `<<Allegati>` element. This PR also improves how Allegati attachments are named, as my previous PR #246220 could result in files with two extensions (e.g. "filename.txt.TXT"). Ticket [link](https://www.odoo.com/odoo/project.task/5800658) opw-5800658 Forward-Port-Of: odoo/odoo#252806
20 changes
Resolved issues and error corrections
This update resolves an issue where the filmstrip on the shop page had inconsistent heights when images were missing. The fix ensures a consistent display across all designs, regardless of image presence, and introduces a placeholder image for empty filmstrips. This improves the overall visual appearance and user experience.
Original PR description
This commit fixes two issues regarding the filmstrip in the /shop page : - Adding a minimum height to the elements of the `default` and `bordered` designs, so that their heights remain consistent whether they contain an image or not. - Display a placeholder image for the `images` filmstrip if empty. task-5491550 | Before | After | |--------|--------| | <img width="613" height="103" alt="image" src="https://github.com/user-attachments/assets/852ef2ce-6265-4622-9e30-4e8112bbf264" /> | <img width="618" height="114" alt="image" src="https://github.com/user-attachments/assets/0933c0c2-a669-4236-9148-a25226214ce6" /> | | <img width="718" height="164" alt="image" src="https://github.com/user-attachments/assets/ac1b8d91-44fa-4ce0-8ddb-beba271a2423" /> | <img width="718" height="164" alt="image" src="https://github.com/user-attachments/assets/8676e9f9-074b-40e9-a75b-76561437c081" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where product names in the website catalog's table of contents were overflowing when many products were displayed. The change updates the product snippet template to use `h6` tags instead of `h2` tags for product titles, ensuring proper recognition by the table of contents plugin. This improves the overall presentation and usability of product listings.
Original PR description
# How to reproduce - Have atleast one product published on the website. The more products published, the more noticable the issue is - Edit the website - Add a table block to a page (Search for table…
# How to reproduce
- Have atleast one product published on the website. The more products published, the more noticable the issue is
- Edit the website
- Add a table block to a page (Search for table in the "Insert block" popup and pick the first one)
- Add a catalog block to the table. This catalog block needs to be the one with the title "Our latest content".
- Add any other block in the table block to update the table of content
# The problem
The table of contents display the names of the different products. If there are a lot of products, it fills the whole table of content
# Why
The TableOfContentPlugin scans for ```<h2>``` tags to use them in the table of content.
```js
updateTableOfContentNavbar(tableOfContentMain) {
const tableOfContent = tableOfContentMain.closest(".s_table_of_content");
const tableOfContentNavbar = tableOfContent.querySelector(".s_table_of_content_navbar");
const currentNavbarItems = [...tableOfContentNavbar.children].map((el) => ({
title: el.textContent,
href: el.getAttribute("href"),
}));
if (tableOfContentMain.children.length === 0) {
// Remove the table of content if empty content.
this.dependencies.remove.removeElement(tableOfContent);
return;
}
const targetedElements = "h1, h2";
const currentHeadingItems = [...tableOfContentMain.querySelectorAll(targetedElements)]
.filter((el) => !el.closest(".o_snippet_desktop_invisible"))
.map((el) => ({ title: el.textContent, id: `#${el.id}`, el }));
```
The product snippet template uses ```<h2>``` for their product title dispite having the h6 CSS class.
Note that the reason you need to add another block to the table to see the issue is that the table of content is updated before the products are loaded in the catalog.
opw-5992937
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253002This update fixes an issue where mass email campaigns were failing due to inconsistencies in email date information. The fix adds a default date to emails lacking a date or create_date, ensuring reliable sorting and preventing errors during email processing. This improves the stability and performance of our email sending functionality.
Original PR description
Background: In odoo.com, due to some migration scripts, there are messages without neither a date nor create_date Issue: When sending mass emails to applicants, when determining the parent email, emails are sorted using their date, but since some emails have a date and some don't, comparing them results in an exception (comparing datetime with bool). Fix: Add datetime.min as a fallback for the email's date if neither date nor create_date are set. Task-6041584 Forward-Port-Of: odoo/odoo#254372
This update optimizes how Odoo calculates inventory values, specifically for large warehouses with many locations. By directly using valued locations instead of redundant expansion, the process is significantly faster. This change reduces the time it takes to generate inventory valuation reports, improving overall system performance.
Original PR description
To compute the inventory valuation report, stock_account builds a valuation context through `_with_valuation_context()` and passes the valued internal/transit locations to stock quantity computation.…
To compute the inventory valuation report, stock_account builds a valuation context through `_with_valuation_context()` and passes the valued internal/transit locations to stock quantity computation. Without `strict=True`, stock quantity domains treat these locations as hierarchical anchors and expand them again through the location tree. This is redundant in this specific call site because `_with_valuation_context()` already provides the valued locations to filter on. On databases with a large location tree, this extra expansion makes the inventory valuation load much slower than necessary. Using `strict=True` makes quantity computation use the provided valued locations directly. ### Benchmark: - active products: 5912 - stock moves: ~785k - internal locations: 4213 | Before | After | |---------|--------| | 99.285s | 1.853s | opw-5944584 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253656
This update fixes a bug that caused Odoo to crash when adding products to a list field while in edit mode. Specifically, the issue occurred when a user pressed a key while adding a product, leading to an error. This change ensures a more stable and reliable user experience when managing product lists.
Original PR description
When a record is in edit mode in an x2many list and the user presses a key while clicking "Add a product", onCellKeydownEditMode is called with record=null while editedRecord is set, causing a TypeError on record.dirty. Steps to reproduce: 1. Create a Sales Order 2. Click "Add a product" 3. While pressing the right arrow key, click "Add a product" again opw-6032870 Forward-Port-Of: odoo/odoo#254881
This update enhances the user experience by adding zoom functionality to product images within the Product, Expenses, and Point of Sale modules. Previously, users couldn't easily inspect smaller details of products. This change provides a more detailed and intuitive view for product selection and presentation.
Original PR description
This PR enables the zoom feature for product images across the **Product**, **Expenses**, and **Point of Sale** modules. Currently, some product views display images without the zoom capability. This makes it difficult for users to inspect smaller details of a product. Enabling the `zoom` option on the `image_1920` widget provides a more consistent UI. ### **Changes** Added zoom to the following modules: **hr_expense** (product variant), **point_of_sale** (product view), and **product** (template and variant views). **Task ID: 6003499**
This update fixes a bug where users could confirm empty `TextInputPopup` fields, impacting key processes like adding floors and generating gift cards. Now, the confirm button is disabled if the input is blank or contains only spaces, ensuring data integrity and preventing incorrect actions.
Original PR description
*= point_of_sale, pos_loyalty, pos_restaurant Before this commit: =================== - User was able to confirm `TextInputPopup` with an empty input value. Affected functionalities: - Add New Floor - Rename Floor / Table - Enter Code (Gift card or Discount code) - Generate a Gift Card After this commit: ================== - The confirm button will be disabled if the input value is empty or has only spaces so that an empty string will not be accepted. Task-6019160 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255354 Forward-Port-Of: odoo/odoo#253307
This update fixes a validation issue related to ZATCA XML generation in Saudi Arabia. Previously, invoice cash rounding wasn't included in the payable amount calculation, causing validation errors. The change ensures the rounding amount is correctly added, resolving the validation mismatch and ensuring accurate invoice processing.
Original PR description
Currently the generated ZATCA XML is not accounting for invoice cash rounding, leading to an invoice validation issue due to a mismatch in the calculation of PayableAmount. Steps to reproduce: - Have a SA Company setup - Create a [cash rounding] with strategy 'Add invoice line' and rounding 1.00 (UP) - Create an invoice for 99.55 + 15% Tax - Set Cash Rounding Method to [cash rounding] - Confirm and send xml for validation Issue: Validation will issue the following warning `[202] BR-CO-16 : Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).` Analysis: The ZATCA implementation was calculating the payable amount strictly as (TaxInclusiveAmount - PrepaidAmount). This change ensures the rounding amount is fetched and added to the total payable calculation opw-5939550 Forward-Port-Of: odoo/odoo#255178 Forward-Port-Of: odoo/odoo#253555
This update resolves a test failure (runbot error 242012) related to product imports. The change ensures tests are no longer reliant on demo data, improving their reliability and preventing disruptions to the product import process. This enhances the stability of the product management features.
Original PR description
runbot error: 242012 (lasted error in `Post install tests for pos_restaurant -> !sale`: resolved)
This update resolves an issue where a 'false' value for the TOTP secret caused the feature to be disabled. The change ensures that an empty string is used when TOTP is not enabled, improving the system's reliability and preventing unexpected behavior. This update focuses on a technical detail to ensure proper functionality.
Original PR description
Empty strings in secret mean that totp is not enabled. Remove support for the totp_secret = 'false'. If we don't have a secret, it should be empty (null or ''). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents incorrect cash rounding adjustments when POS orders are consolidated into invoices. Previously, the system would create rounding lines even with non-cash payment methods, leading to errors. This fix ensures rounding adjustments only occur with actual cash payments, improving invoice accuracy.
Original PR description
When consolidating POS orders into a single invoice, the cash rounding adjustment logic was triggered whenever cash rounding was enabled on the POS configuration, even if the payment methods were not cash.
In scenarios where only non-cash payment methods (card or customer account) were used, 'invoice.invoice_cash_rounding_id' could legitimately be unset as 'only_round_cash_method' is enabled. However, the rounding adjustment code still attempted to create a rounding line using accounts from this field.
This resulted in a NULL `account_id` on a rounding line ("Missing required account on accountable line")
This fix ensures that the rounding adjustment logic only executes when there is cash payment (meaning that 'invoice_cash_rounding_id' exsists).
Related to opw-5969706
Forward-Port-Of: odoo/odoo#251862This update fixes an issue where component products weren't being correctly consumed during production runs. The change ensures that consumed quantities are accurately tracked and a warning message appears when attempting to produce without proper lot/serial number information. This prevents errors and ensures accurate inventory management.
Original PR description
# Product Configuration *Manufactured Product* - Storable - Tracked by Quantity - Manufacture Route - Has a BOM with atleast 1 component *Component Product* - Storable - Tracked By Lot # How to…
# Product Configuration
*Manufactured Product*
- Storable
- Tracked by Quantity
- Manufacture Route
- Has a BOM with atleast 1 component
*Component Product*
- Storable
- Tracked By Lot
# How to reproduce
- Ensure there is available stock for the component product in a lot
- Create a MO for the Manufatured Product
- Confirm the MO
- Click "Details" on the component product
- Remove the reserved quant and add a new one
- Increase the quantity of this new quant to more than "To Consume"
- Save
- Observe that "Consumed" = The quantity you just set on the quant
- Click on "Produce All"
# The issue
- The Consumed quantity is reset to the "To Consume" quantity.
- Furthermore, a warning popup should be displayed when clicking on "Produce All" but there is none.
- Finally, depending on the version you may get this error message : "You need to supply Lot/Serial Number for products and 'consume' them: - Component Product" even though a lot is already assigned
# Why
All these issues stem from the fact that move_raw_ids.picked from mrp.production is set to False instead of True.
This issue was introduced by this commit (https://github.com/odoo/odoo/commit/ef592464983d66ac76bc71a9886462f1f47dc28d) that changed the way the picked value is set.
In write(self, vals) de stock_move, we have :
```py
if self.env.context.get('force_manual_consumption') and 'quantity' in vals:
moves_to_update = self.filtered(lambda move: move.product_uom_qty != vals['quantity'])
if moves_to_update:
moves_to_update.write({'manual_consumption': True, 'picked': True})
```
Followed a bit later by :
```py
res = super().write(vals)
```
This usually works fine except when vals contains edition commands for move_line_ids. Then, the first write will correclty set picked to True, but then picked will be reevaluted after the second write with :
```py
@api.depends('move_line_ids.picked', 'state')
def _compute_picked(self):
for move in self:
if move.state == 'done' or any(ml.picked for ml in move.move_line_ids):
move.picked = True
else:
move.picked = False
```
If all the resulting move_line_ids from the commands edition have picked set to False, then move.picked will also be set to False.
opw-5937171
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253607This update corrects a bug where presence status information wasn't updating correctly after changes to related records like holiday schedules. The fix ensures that status updates are immediately reflected, preventing outdated information from being displayed to users. This improves the reliability of presence indicators.
Original PR description
After sending a presence notification, `_send_status_updated_notification` leaves `im_status` cached on the user/guest record. If a related model that affects `im_status` (such as `hr.leave`) is modified afterwards in the same transaction, the ORM has no declared dependency on it and will not invalidate the cache. Subsequent reads then return the stale value. breaking PR: https://github.com/odoo/odoo/pull/249314 runbot-242076 Forward-Port-Of: odoo/odoo#255361
This update fixes an issue where stock valuation reports incorrectly displayed inventory values after a product was marked as trackable. Previously, the system didn't automatically adjust inventory levels when tracking was enabled. This change ensures accurate stock valuation reporting, reflecting the true value of inventory for trackable products.
Original PR description
### Steps to reproduce: - Create a product that is not track inventory (`is_storable = False`) - Set its cost to 50$ and put it in an avco perpetual valuation category - Create and receive a purchase…
### Steps to reproduce: - Create a product that is not track inventory (`is_storable = False`) - Set its cost to 50$ and put it in an avco perpetual valuation category - Create and receive a purchase order for 10 units - Set the product as track inventory (`is_storable = True`) - Inventory > Reporting > Stock - Click on the `unit cost` of your product line #### > This opens the `stock.avco.report` according to which the total value of your stock is 500$ and the total quantity is 10 units even though do not have any unit in stock. ### Expected behavior: The line of the receipt should have been counter balanced by an inventory adjustment line to resets the valuation at the same time as the product has been set to `is_storable` ### Cause of the issue: There is currently no mechanism to counter balance the stock that should have been present in internal locations if the moves done had been processed with a storable product. opw-5472902 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254380
This update resolves an issue where notification reminders would fail when attendees had access to companies not visible to the event organizer. The fix ensures that attendee company access is properly checked, allowing reminders to function correctly regardless of the organizer's company permissions. This improves the reliability of event invitations and notifications.
Original PR description
[FIX] calendar: use sudo for attendee company access in notifications Invitations with notification reminders fail if the attendee has access to companies hidden from the organizer. ### Reproduction Steps 1. User A (Company 1) invites User B (Company 1 & 2). 2. Add a "Notification" reminder. 3. Saving the event raises an AccessError on res.company. ### Cause When preparing notifications, the attendee's company list is fetched while still in the organizer's environment. The `res.company` record rule restricts visible companies to the organizer's own, so the attendee's extra companies are blocked. Since 9a21edd99e7f, `Many2many.read()` uses `_search()` without `bypass_access`, which explicitly checks read access and raises `AccessError` instead of silently filtering at the SQL level. opw-5916536 Forward-Port-Of: odoo/odoo#253679
This update resolves a memory issue that could occur when generating the inventory valuation report for companies with many products and extensive stock movement history. By processing inventory calculations in smaller batches, the system now uses significantly less memory and avoids crashes, leading to faster report generation.
Original PR description
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error…
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error can occur when the inventory valuation report is opened. Explanation: When the inventory valuation report is opened, the `_run_average_batch` method is invoked on batches of up to 1000 AVCO products at a time. Previously, all matching stock moves for those products were fetched in a single query and kept in cache for the duration of the computation. For large databases, even a single invocation of `_run_average_batch` can exhaust available memory if the products involved have enough stock moves. Solution: Moves are now fetched and processed in batches of 50,000 records, with the cache for `stock.move` and `stock.move.line` invalidated between each batch. For memory: | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 280 MB | 274 MB | | 500 products with 535,250 moves | 983 MB | 301 MB | | 500 products with 912,405 moves | 1.7 GB | 337 MB | | 1000 products with 1,447,655 moves | Mem error | 393 MB | For speed (in m:ss): | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 0:15 | 0:16 | | 500 products with 535,250 moves | 1:12 | 1:17 | | 500 products with 912,405 moves | 2:02 | 2:10 | | 1000 products with 1,447,655 moves | N/A | 3:53 | opw-5416006 Co-authored by Cooper Spinelli (spco) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#250526
This update resolves an issue where custom snippets created from dynamic content (like events or sales) wouldn't display the dynamic data in the preview. The fix ensures that dynamic content is correctly reflected in the preview iframe, improving the user experience when building and testing website content.
Original PR description
*: website_blog, website_event, website_sale The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for…
*: website_blog, website_event, website_sale The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for the initial dynamic snippet, as they are filled with fake content. But when saving a custom snippet, the dynamic content is cleared, and they seem empty when previewed. This is the case since the [website builder refactor] as the previous builder re-used the preview of the initial snippet. This commit adds the interaction to fill dynamic content in the preview iframe, and changes the interaction to avoid emptying the fake content from initial dynamic snippets during preview. Steps to reproduce: - Open website builder - Add a dynamic snippet (for example "Events") - Save the snippet as a custom snippet - Click on "Custom" snippet category - Bug: The preview for the custom snippet does not have the dynamic part (there is no event, just the title) [website builder refactor]: 9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2 task-5427353 Forward-Port-Of: odoo/odoo#253985 Forward-Port-Of: odoo/odoo#246328
This update fixes an issue where users couldn't properly filter records based on date and time properties within the CRM. The update now correctly recognizes and handles these property fields, ensuring accurate filtering capabilities. This enhancement improves the usability of the CRM for managing time-sensitive data.
Original PR description
Steps: - Install crm - Add a propertie field date type - try to filter with this field - Invalid domain Currently tree_editor does not take into account if a path is a property field or not, with this commit there is a new `is_property` attribut in node opw-5906605 Forward-Port-Of: odoo/odoo#250350
This update resolves an issue where creating a project from a template without a company would trigger a 'company inconsistencies' error. The fix ensures that the customer's company information is correctly applied when a project is created from a template, allowing for more flexible project setup. This improves usability for users managing projects with diverse customer relationships.
Original PR description
### Issue: Creating a project from a template that has no company with a customer who has one results in a "company inconsistencies" error. ### Steps to reproduce: - Install `hr_timesheet` and `project` - Convert a project with no companies and the option "Timesheets" ticked, to a template - Create a new project using the template - In the wizard, input a name and select a customer with a company - Click "Create Project" - An error pops up ### Cause: `hr_timesheet` overrides the `create()` of `project.project` to create an `account.analytic.account` if the project allows timesheet and none is given. During the creation of the analytic account, as the field `partner_id` is `check_company=True`, the error is raised in `_check_company()`. ### Solution: We set the company of the customer on the generated project before building the `analytic_accounts_vals` list. opw-5931994 Forward-Port-Of: odoo/odoo#250150
A bug in the Odoo testing framework was causing freezes due to an infinite loop. This was resolved by switching from an array to a set data structure, preventing the framework from repeatedly visiting the same child nodes and exhausting resources. This ensures stable testing and prevents disruptions to the Odoo system.
Original PR description
Problem: Triggering the `child_of` operator in the testing framework caused an infinite loop that froze Odoo. This occurred because the framework attempted to fetch all children of the root operand without accounting for already visited nodes, resulting in children being added indefinitely. Solution: Switched from using an `array` to `set` to prevent duplicate traversal. Task-6023290 Forward-Port-Of: odoo/odoo#255419 Forward-Port-Of: odoo/odoo#254857
14 changes
Resolved issues and error corrections
This update corrects a problem where downpayment invoices for orders with fixed taxes were incorrectly generated without associated tax lines. This prevented proper invoice formatting for Peppol, causing errors. The fix removes the problematic downpayment calculation related to fixed taxes to ensure accurate invoice creation.
Original PR description
When making a downpayment for an order containing product using fixed taxes, the downpayment invoice would contain line without tax associated This is an issue when sending these invoices to Peppol. Steps to reproduce: ------------------- * Create a fixed tax of 5€ * Set this tax on any product along another tax * Create a sale order for this product * Make a downpayment of 10% * The invoice created has a line without any tax set > Observation: When sending to Peppol we get an error Why the fix: ------------ We remove the downpayment part that concerns fixed tax to avoid having lines without tax set. opw-5853070 Forward-Port-Of: odoo/odoo#254335
This update ensures that VAT reports (l10n_rs_edi and l10n_pl_edi) consistently attach related documents within the same transaction. Previously, updating move fields and attachments separately could lead to inconsistencies. This change improves data integrity and reliability for VAT reporting.
Original PR description
Was committing the move fields update, then updating the attachment. This might create an issue were the move update commits successfully, but setting the attachment fails and we end up with an inconsistency. Set attachment in the same transaction as the move update. task-6035727 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255262
This update corrects a bug where selecting a PO would reset the prices of unselected alternative POs to the standard price. The fix now properly cancels unselected POs, preserving their original prices and preventing incorrect recalculations. This ensures accurate PO pricing and avoids potential financial discrepancies.
Original PR description
**Issue**: Choosing a PO among several alternative POs resets the price of all the unselected ones. **Steps to reproduce**: - Create a storable product with a standard price of 1 - Add two vendors…
**Issue**: Choosing a PO among several alternative POs resets the price of all the unselected ones. **Steps to reproduce**: - Create a storable product with a standard price of 1 - Add two vendors for a quantity of 1 with a unit price 1.1 and 1.2 - Create a PO for one vendor with 10 units at price 1.3 - Create an alternative PO for the other vendor with 10 units at price 1.4 - Compare the POs and choose the first one -> The unit price of the second one (1.4) is reset to the standard price (1) **Cause**: When choosing a PO, the quantities of alternative POs are reset to 0: https://github.com/odoo/odoo/blob/1b5072c0e0af6be340389e0c429ca370d8dc169d/addons/purchase_requisition/models/purchase.py#L317-L321 https://github.com/odoo/odoo/blob/1b5072c0e0af6be340389e0c429ca370d8dc169d/addons/purchase_requisition/models/purchase.py#L304 which will trigger the `_compute_price_unit_and_date_planned_and_name`. Since the quantity no longer matches any vendor, no seller is found (10 on the pol and 1 in vendor): https://github.com/odoo/odoo/blob/f5a24b10cb3a4cf32c6c185df65f3099c8da3ff1/addons/purchase/models/purchase.py#L1198-L1203 but `unavailable_seller` is found, since the quantity is not in the search https://github.com/odoo/odoo/blob/f5a24b10cb3a4cf32c6c185df65f3099c8da3ff1/addons/purchase/models/purchase.py#L1210-L1215 As a result, the price is recomputed using `standard_price`: https://github.com/odoo/odoo/blob/f5a24b10cb3a4cf32c6c185df65f3099c8da3ff1/addons/purchase/models/purchase.py#L1218 **Solution** Cancel unselected alternative POs instead of resetting their quantities to 0. This avoids triggering `_compute_price_unit_and_date_planned_and_name` and preserves original prices. opw-[6022718](https://www.odoo.com/web#id=6022718&view_type=form&model=project.task)
A test within the MRP module was failing due to a dependency on a module only available in the Enterprise version of Odoo. This update removes the problematic dependency, ensuring the test now runs successfully across both Community and Enterprise environments. This resolves a test failure and improves overall test coverage.
Original PR description
The test `test_multi_lot_component_consumption` relies on `move_raw_line_ids`, which is initialized by the `stock_barcode_mrp` module. This module is only available in enterprise, causing the test to fail in community setups. https://github.com/odoo/odoo/blob/0ce5baf2918960591284eb494d82dfef07043af0/addons/mrp/tests/test_consume_component.py#L481 runbot-241990
A minor bug in the Point of Sale test suite was causing it to fail. This update ensures that changes to order data are properly synchronized with IndexedDB before page refreshes, preventing data loss and improving test reliability. This ensures consistent test results and a more stable Point of Sale experience.
Original PR description
During the tour test `CustomerNoteIsPresentAfterRefresh`, we set a customer note on an order line and then refresh the page. Even though we wait for the customer note to be written on the `pos.order.line` record, the change must also be saved in IndexedDB before the refresh. Otherwise, the data reloaded after the refresh does not contain the customer note, causing the test to fail. The issue was that the page refresh could happen before the debounced `syncDataWithIndexedDB` was completed. To fix this, an additional step was added in the tour to wait briefly, ensuring that `syncDataWithIndexedDB` finishes before refreshing the page. --- Runbot error: https://runbot.odoo.com/odoo/runbot.build.error/231435
This update ensures Odoo's cbor2 library aligns with the latest Debian Bookworm and Ubuntu Jammy versions, including a pre-built wheel. This change improves stability and performance by using a more current and optimized version of the library.
Original PR description
This commit sets the cbor2 library's version to match more closely the Debian Bookworm/Ubuntu Jammy packaged versions and to match the ones with a prebuild wheel. Note: while the 5.4.2 already matched the one from Jammy, it didn't provided a corresponding wheel, which the 5.4.2.post1 did fix (cf. https://github.com/agronholm/cbor2/releases/tag/5.4.2.post1). runbot-238903
This update significantly speeds up the process of creating manufacturing orders when a Sale Order triggers a large Bill of Materials (BoM) explosion. Previously, this process could take several minutes. Now, a contextual cache is used to avoid redundant calculations, resulting in a much faster and more efficient experience.
Original PR description
Before this commit, confirming a Sale Order that creates a Manufacturing Order for a product with a large BoM could take several minutes when `purchase_mrp` was installed. The slowdown comes from…
Before this commit, confirming a Sale Order that creates a Manufacturing Order for a product with a large BoM could take several minutes when `purchase_mrp` was installed. The slowdown comes from `mrp.bom.line._get_cost_share()`, which is called for every line during a BoM explosion. When no explicit `cost_share` is set, the method recomputes the list of eligible BoM lines and checks whether any of them has a manual cost share. That computation depends only on the BoM and the product variant, but it is recomputed for every exploded line during `mrp.bom.explode()`. This causes a full BoM scan to be repeated for every single line. This commit introduces a contextual cache, initialized in `mrp.bom.explode()`, to store that metadata. We compute it once and reuse it for all lines of the same (BoM, variant) within the same explosion. ### Benchmark: | BoM lines | Before PR | After PR | | --- | ---: | ---: | | 100 | 3.747s | 1.094s | | 300 | 26.554s | 2.826s | | 600 | 85.378s | 5.299s | | 992 | 229.246s | 9.068s | opw-6017626 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where marketing emails created in RTL languages (like Arabic) were incorrectly rendered as left-to-right. The fix ensures that email formatting respects the user's language direction, delivering emails in the correct layout. This improves the user experience for international customers.
Original PR description
**Steps to reproduce:**
- Install Mail Marketing app
- Change user language to a RTL language (such as Arabic)
- Create a marketing campaign with RTL content
- Send it
- Mail received changes from RTL to LTR
**Issue:**
Conversion doesn't seem to take into account the `dir` top-level attribute when creating the inline styling. This keeps the mails in the default format ('ltr').
**Fix:**
Check if the top-level element has such attributes, and manually add the `direction` style instead (style is applied on all direct children to ensure it's taken into account when taking the `innerHTML`).
opw-5982854This update fixes a previous restriction that prevented users from editing taxes on reward lines within confirmed sales orders. Previously, confirming an order would recompute taxes on these lines. Now, tax edits are permitted on confirmed reward lines, ensuring accurate order calculations without impacting the order's final price.
Original PR description
Issue: --- Due to this issue, the tax on reward SOL cannot be edited. Cause: --- This is introduced in #172110 to prevent users from editing taxes on reward lines because confirming the order would recompute the tax. We can make it editable on confirmed SO as the tax wouldn't recomputed on reward lines later. opw-5918435
This update resolves a confusing error in the website editor related to loading custom Google Map snippets. The fix prevents errors when users create custom snippets from disabled base snippets, ensuring a smoother editing experience. It also clarifies which snippet is the Google Map snippet.
Original PR description
Steps to reproduce: 1. Go to the website editor (ensure developer mode is off) 2. Drag and drop a Map snippet onto the page 3. Click on the newly placed snippet and save it as a custom snippet 4.…
Steps to reproduce: 1. Go to the website editor (ensure developer mode is off) 2. Drag and drop a Map snippet onto the page 3. Click on the newly placed snippet and save it as a custom snippet 4. Enable developer mode and refresh the website editor 5. Add a new Google Map snippet to the page a. The Google Map snippet is the one where the icon shows a map with a pin on the **left side**. 6. In the wizard, enter your valid API key and click Save a. Alternatively, you can use Odoo inspector to write any string into the `google_maps_api_key` field of the `website` model to simulate the above 7. Disable developer mode and refresh the website editor 8. Click one of the categories in the editor side panel to open the snippets browser 9. Click into the 'Custom' snippets category 10. Observe the error Depending on whether or not you have a Google Maps API key configured on your website, either the `s_map` or `s_google_map` base snippet will be disabled/hidden. When a user has created custom snippets out of the disabled base snippet, you will recieve the error mentioned above when the snippet browser attempts to load in these custom snippets, as it will be unable to load the base snippet. To fix this, we check if an original snippet was found when loading in a custom snippet. If not, we will not load in the custom snippet to avoid confusion. This error does not occur in Developer Mode, as both base snippets are always enabled in this case. Aditionally, we also clarify which snippet is the Google Map snippet to avoid confusion for the user when creating custom snippets. opw-5933787
This update fixes an issue where invoices processed through Nemhandel were incorrectly using the VAT ID instead of the company partner's EAN/GLN as the EndpointID. The change ensures invoices are correctly formatted for Nemhandel processing, improving data accuracy and compliance. This resolves a problem that could have resulted in incorrect invoice transmission.
Original PR description
**STEP TO REPRODUCE** 1. install l10n_dk_nemhandel, and activate nemhandel. 2. Create a company partner, with a EAN/GLN as the nemhandel id. 3. Create an individual partner linked to the company partner. 4. Create an invoice with this individual partner. 5. Send the invoice with nemhandel. 6. open the xml file, and notice that the EndpointID doesn't use the EAN/GLN of the company partner. (It falls back to the VAT instead). opw-5945440
This update ensures survey invitations are sent in the correct language for recipients with different language preferences. Previously, mixed-language groups received invitations in a default language. This fix uses recipient language settings to deliver personalized invitations, improving user experience and data accuracy.
Original PR description
When sending survey invitations to a group of recipients with different language preferences, some recipients would receive the invitation in the incorrect language. ### Steps to reproduce 1. Install the "Surveys" module and activate a second language (e.g., Dutch). 2. Create a survey and ensure its invitation template has translations for both languages. 3. Create two contacts: one with English as their language and another with Dutch. 4. On the survey, click "Share" and add both contacts as recipients. 5. Send the invitations. 6. The contact with Dutch preferred language receives the email in English. ### Cause By default, the wizard uses a single language for every email in a batch. While it can switch this language if everyone in the group speaks the same tongue, it fails to do so for mixed-language groups. Adding compute_lang=True fixes this by telling the system to look up and use the correct language for each recipient one by one. opw-5868581
This update resolves communication issues with printers running on localhost (127.0.0.1) by correctly utilizing the 'loopback' TargetAddressSpace. This enhancement ensures stable connections with locally running printers, eliminating previous restrictions and simplifying setup.
Original PR description
This commit backports support for loopback TargetAddressSpace from 19.0. Before: LNA requests to localhost (127.0.0.1) used "local" TargetAddressSpace, which caused communication issues (CORS/PNA restrictions). After: Requests to localhost now correctly use "loopback" TargetAddressSpace, allowing proper communication with locally running devices. Impact: Enables stable communication with USB/network printers running on localhost without requiring IoT devices. Reference: https://github.com/odoo/odoo/pull/250972 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a potential issue where Italian VAT withholding invoices were incorrectly processed due to mismatched withholding reasons. The change broadens the system's search criteria to allow for the use of taxes with the same withholding type, even if the specific reason differs. This ensures more accurate VAT calculations and reporting for Italian businesses.
Original PR description
Some invoice come in with a wrong ENASARCO withholding reason. We now broaden the search to allow taxes with the same withholding type to be used during import even if the withholding reason doesn't match. In the test, I change the Enasarco tax to reason Q to check that it gets correctly assigned. Ticket [link](https://www.odoo.com/odoo/project.task/5175587), [link](https://www.odoo.com/odoo/project.task/5933699) opw-5175587 opw-5933699 Forward-Port-Of: odoo/odoo#236251
4 changes
Resolved issues and error corrections
This update resolves a performance issue where processing large Peppol invoices caused delays and potential cron job failures. By batching invoice processing, the system now handles high volumes of invoices much more efficiently, reducing processing times significantly. This improves the reliability of Peppol document creation.
Original PR description
### Description: Retrieving Peppol documents with high line counts could cause the background cron to timeout and eventually be disabled after multiple failures. This bottleneck occurred because the system processed each invoice line through individual calls. To resolve this, the code has been refactored to batch the creates and updates. This change significantly reduces I/O overhead and ensures that large invoices no longer block the cron from creating new documents. ### Benchmark: | N° of lines | Before | After | |-------------|---------|--------| | 4633 | Timeout | 3 min | ### Reference: opw-5462267
This update resolves an issue where PDFs with multiple XML attachments (organized in a specific PDF format) weren't being correctly extracted. The fix ensures that all XML attachments embedded within these PDFs are now processed, preventing empty bills and improving data accuracy. This enhancement impacts how attachments are handled in accounting documents.
Original PR description
Steps to reproduce: - From the accounting dashboard, upload a PDF containing intermediate /Kids nodes representing separate xml attachments Issue: No xml will be extracted, as result the bill will be empty. However, in the chatter pdf preview, the js pdf toolkit correctly show the xml attachemnts. Analysis: The PDF spec defines two ways to organize embedded files under /EmbeddedFiles in the document's name dictionary: - /Names: a flat array of pairs located directly under /EmbeddedFiles - /Kids: an array of child nodes, each of which carries its own /Names array. The extractor currently only handled the /Names case, not detecting embedded attachments in case of PDF using a /Kids tree. This change add lookup for both structures. opw-5929274
This update prevents 404 errors when accessing website content without logging in. The issue stemmed from how website access rules were evaluated, leading to incorrect access denials. The fix ensures proper website context is available during rule evaluation, allowing authorized access to public records.
Original PR description
\* = test_website_modules ### Issue: When accessing a record from the website without logging in, a `404` error occurs if a public record rule filters records by website related domain, for example…
\* = test_website_modules
### Issue:
When accessing a record from the website without logging in, a `404`
error occurs if a public record rule filters records by website related
domain, for example `[('website_id', '=', website.id)]`.
### Steps to reproduce:
- Install the 'website_blog' module and create at least one website.
- Enable debug mode.
- Go to Settings > Technical > Database Structure > Models.
- Open the `blog.post` model.
- Go to the 'Record Rules' tab.
- For the record 'Blog Post: public: published only', change the domain
from `[('website_published', '=', True)]` to
`[('website_id', '=', website.id)]`.
- Go to Website > Configuration > Blogs.
- Open a blog (e.g., Travel).
- Select 'My Website' in its 'Website' field.
- Open 'My Website' without logging in.
- Click on the 'Blog' menu and the blog listing will appear correctly.
- Try opening a blog post and a `404` error occurs.
### Reason:
<pre>
┌─────────────────────────────────────────────────────────┐
│ Request Lifecycle │
├─────────────────────────────────────────────────────────┤
│ │
│ User Request (not logged in) │
│ ↓ │
│ ┌──────────────────────────────────────┐ │
│ │ 1. _pre_dispatch │ │
│ │ ↓ │ │
│ │ check_access_rule │ │
│ │ ↓ │ │
│ │ _eval_context (compute domain) │ │
│ │ ↓ │ │
│ │ get_request_website() │ │
│ │ ↓ │ │
│ │ request.website = None │ ← Issue │
│ │ ↓ │ │
│ │ Domain evaluation FAILS │ │
│ │ ↓ │ │
│ │ Access DENIED → 404 Error │ │
│ └──────────────────────────────────────┘ │
│ ↓ │
│ ┌──────────────────────────────────────┐ │
│ │ 2. _frontend_pre_dispatch │ │
│ │ (NEVER REACHED) │ │
│ │ ↓ │ │
│ │ request.website initialized ✓ │ ← Too Late │
│ └──────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
</pre>
Because `request.website` is initialized later in
`_frontend_pre_dispatch`, access rules evaluated earlier in
`_pre_dispatch` cannot rely on website context. As a result, record
rules depending on `website_id` are evaluated before `request.website`
is available, incorrectly denying access to public records.
### Fix:
Avoid totally relying on `get_request_website` during access rule
evaluation. Use the `request.is_frontend` attribute as a fallback, which
is set earlier, to detect frontend requests and ensure correct access
handling.
task-[4758311](https://www.odoo.com/odoo/project/974/tasks/4758311)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update resolves a problem where QR codes on point-of-sale receipts were sometimes incorrect, pointing to the wrong invoice. The issue stemmed from how the system cached QR code images, leading to duplicate keys. The fix ensures unique QR codes are generated for each order, improving receipt accuracy and customer experience.
Original PR description
**Step to reproduce:** - install "l10n_es_edi_verifactu_pos" - setup "ePOS printer" for a pos - open pos and settle a order below 400$ - notice we get l10n_es_edi_verifactu_qr_code in our receipt -…
**Step to reproduce:** - install "l10n_es_edi_verifactu_pos" - setup "ePOS printer" for a pos - open pos and settle a order below 400$ - notice we get l10n_es_edi_verifactu_qr_code in our receipt - click on "Print receipt" - repeat above steps for one more order **Observation:** - when we print the second order receipt, the QR still points to 1 order invoice **Issue:** - [getCacheKey](https://github.com/odoo/odoo/blob/0cee3350df09b06af77c879f0eba74bf6a8dd2c9/addons/point_of_sale/static/src/app/utils/html-to-image.js#L351C10-L355 ) was trimming query strings when generating cache keys. URLs like: ` http://localhost:9000/report/barcode/?barcode_type=QR&value=... ` were reduced to: ` http://localhost:9000/report/barcode/` - As a result, different QR code requests shared the same cache key. Subsequent requests reused the previously cached image instead of fetching a new one, producing incorrect QR codes for different orders. **Solution:** Add an `includeQueryParams` flag to `resourceToDataURL` so the full URL, including query parameters, is used as the cache key when needed. This ensures unique QR code URLs are cached and fetched correctly. opw-5455807 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr