Tuesday, March 24, 2026
111 changes
2 changes
Resolved issues and error corrections
This 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 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
6 changes
Resolved issues and error corrections
This 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 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
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
3 changes
Resolved issues and error corrections
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 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