Thursday, April 30, 2026
12 changes · 18.0
Resolved issues and error corrections
This update resolves an issue where attachments weren't uploading reliably when navigating between records in the chatter. The fix ensures attachments are correctly associated with the intended record, preventing data inconsistencies and improving the attachment upload experience. This improves data integrity and user confidence.
Original PR description
Currently, when uploading a bunch of attachments or a big one to the chatter, if you click on the pager (e.g. next) before the upload is complete, the attachments that have not yet been uploaded are uploaded to the next record. Due to the persistence of the Chatter component during record navigation and the fact that the `FileUploader` logic is tied to `state.thread`, an async callback that finishes after a record switch will attempt to update the currently active thread rather than the one that initiated the upload. With this change we tie uploader lifecycle to a specific record and ensure the completion callback only affects that record. task-5119290
This update resolves an issue where vendor bills were incorrectly grouped in journal entries, appearing in multiple statuses. The fix adds a necessary search method to the 'status_in_payment' field, ensuring accurate grouping and reporting based on bill status. This improves the reliability of financial data analysis.
Original PR description
Step to reproduce - create a vendor bill, for say 100$ i.e Bill 1 - post it - go to journal entry menu - group by: "status_in_payment" - expand the lines Observation: - after group by, suppose we get 2 groups in journal entry (Draft, Not Paid) - when we expand. Bill 1 is present in both group (Bill 1 should be in Not paid) - in each group we get all the records Cause: - `status_in_payment` is a compute field, for web_search to work, this fields need a `search` method which is absent here. - in this case, we just set domain = [] - hence, we got above unexpected results https://github.com/odoo/odoo/blob/e7f4a88432d9696800d1f2b9e28bf92320c97422/odoo/osv/expression.py#L1179-L1187 Fix: - Add the search method for this fields opw-6109572 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures correct handling of vendor identification when importing KSeF bills. It now requires the Polish NIP number (without the 'PL' prefix) to be used, aligning with Polish tax regulations for foreign companies operating in Poland. This is crucial for proper KSeF compliance and accurate invoice processing.
Original PR description
When we import bills from KSeF, the vendor (`Podmiot1`) XML tag must include a Polish `NIP` number XML tag. The `NIP` is the base number composing a polish `vat` number, but without the prefix `PL`.…
When we import bills from KSeF, the vendor (`Podmiot1`) XML tag must include a Polish `NIP` number XML tag. The `NIP` is the base number composing a polish `vat` number, but without the prefix `PL`. This is true even if the vendor is from another country like Luxembourg: if they have a stable organization in Poland and sells in Poland - then they have to use a polish `NIP` to use the KSeF and issue their invoices. Two issues: - We search the vendor by `NIP` as it was a `vat` number, but we add the `vendor_country` code as prefix instead of `PL`. I.e. we search for `LU012345678` instead of `PL012345678`. - When we don't find the vendor in the database, we create one using the `NIP` number coming straight from the tag, as it was a `vat` number. I.e. for a partner in Luxembourg, `vat` will become `LU012345678` instead of `PL012345678` ref: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6148039) opw-6148039
This update resolves an issue where the Swedish EC Sales Report exported to KVR (a key accounting format) displayed decimal values instead of the required integer format. This fix ensures accurate reporting for Swedish businesses, aligning with local tax regulations and improving data integrity.
Original PR description
**PROBLEM** EC Sales Report in Sweden needs to be reported with integer values. **STEP TO REPRODUCE** 1. Install l10n_se 2. On the se company, create a invoice with lines with EU tax and confirm it. 3. Go to Accounting/Reporting/EC Sale List and export to KVR. 4. Notices the KVR uses numbers with decimals places. opw-6045289 Forward-Port-Of: odoo/enterprise#114292
This update corrects an issue where barcode-created internal transfers incorrectly displayed zero demand and used the wrong warehouse locations in inventory reports. The fix ensures that scanned quantities accurately reflect demand and that moves are linked to the correct sub-locations, improving inventory accuracy and reporting.
Original PR description
When creating an internal transfer from the Barcode app, stock moves auto-created from scanned lines showed incorrect data in the Moves Analysis list view: - Demand (product_uom_qty) was always 0. -…
When creating an internal transfer from the Barcode app, stock moves auto-created from scanned lines showed incorrect data in the Moves Analysis list view: - Demand (product_uom_qty) was always 0. - Source and destination locations showed the picking's generic header location (e.g. WH/Stock → WH/Stock) instead of the actual sub-locations scanned by the operator. Steps to reproduce: ------------------- * Open the Barcode app and start a new internal transfer. * Add a product from WH/Stock/Shelf to WH/Stock/Shelf2 with qty 8. * Validate the transfer. * Open Inventory > Reporting > Moves Analysis > List View. > Observation: the move shows Demand = 0, From = WH/Stock, To = WH/Stock. Why the fix: ------------ When barcode saves a transfer it writes move_line_ids directly on the picking without pre-existing moves. stock.move.line.create() calls _prepare_stock_move_vals() to auto-create the backing move. Core stock intentionally sets product_uom_qty = 0 for open pickings (so that backorder/procurement logic is not affected), and reads source/dest locations from the picking header rather than from the individual line. For the barcode "scan-first" flow these two defaults are wrong: - The scanned quantity IS the demand; there is no separate planning step. - Sub-location scanning stores the real locations on the line, not on the picking header. _prepare_stock_move_vals is overridden in stock_barcode to set product_uom_qty = self.quantity and propagate the line's locations to the move. For kit (phantom BOM) products, action_explode() deliberately relies on product_uom_qty == 0 as a signal to derive the BOM factor from the actual total scanned quantity (move.quantity) rather than from the first-scan demand, which would be captured too early. A second override in stock_barcode_mrp reverts product_uom_qty back to 0 for kit products only, while keeping the location fix. opw-6150750
This update fixes an issue where the Point of Sale dashboard incorrectly displayed all POS locations under the default warehouse, even when a specific POS was configured with a different warehouse and operation type. The change ensures that the POS dashboard accurately reflects the warehouse associated with each POS based on its setup, improving inventory management and reporting.
Original PR description
When filtering pos by warehouse_id, all pos are under the same warehouse even if we had configure an Operation Type from a different warehouse for a specific pos. Steps to reproduce: ------------------- * Setup a second warehouse in the company * Add the new POS operation type picking for the second warehouse on the POS settings * Group by warehouse in the POS dashboard > Observation: It always shows the first warehouse Why the fix: ------------ The warehouse_id field on pos.config was a plain Many2one with a static default that always set it to the first warehouse of the company. Convert warehouse_id into a computed stored editable field that derives from picking_type_id.warehouse_id. This ensures the warehouse stays in sync when the operation type changes, while still allowing manual override for the Ship Later feature. opw-6104652
This update corrects a bug where B2C customer EDI invoices incorrectly prioritized the phone number over the mobile number. The fix ensures the mobile number is used as the primary contact information, improving data accuracy for electronic invoices and compliance with tax regulations. This change impacts how customer contact details are transmitted in EDI formats.
Original PR description
Current behavior: -- B2C partner type used `partner.phone` instead of `partner.mobile` for the `CustomerPhone` EDI JSON field, ignoring mobile even when present. Expected behavior: -- B2C prioritizes `partner.mobile`, falls back to `partner.phone` when mobile is absent. Steps to reproduce: -- 1. Create B2C partner with both mobile and phone set. 2. Generate EDI invoice JSON. 3. Observe `CustomerPhone` uses phone instead of mobile. If the `phone` field is instead empty for B2C, an error occurs Cause of the issue: -- B2C branch resolved `partner.phone` as primary instead of `partner.mobile`. Fix: -- B2C now resolves `partner.mobile or partner.phone` before calling `_reformat_phone_number`, ensuring mobile is prioritized with phone as fallback. opw-6120115 - I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change fixes an issue where products were incorrectly displayed on the website when viewing from a company other than their designated one. The update ensures product searches respect the currently selected website company, preventing incorrect product visibility and potential sales order errors. This improves data accuracy and user experience.
Original PR description
# Setup Have 2 companies : A & B # How to reproduce - Set your website's company to Company B - Create product X : - Company : Company A - Published - Name : xyz - Go to Users > Any User > Acces…
# Setup
Have 2 companies : A & B
# How to reproduce
- Set your website's company to Company B
- Create product X :
- Company : Company A
- Published
- Name : xyz
- Go to Users > Any User > Acces Rights > Allowed Companies => leave only Company A
- Connect as that user on the website
- Go to the Shop tab and search xyz
# The problem
The product X is displayed, even though we currently use the company B's website and the product is limited to company A.
This causes problem later when Sales Order are created using that product.
If you set the Allowed Companies of the user to both Company A and Company B, then the product is correctly hidden
# Why
When you search something in the search bar, the server does a `_search_with_fuzzy()` that ends up calling a simple `model.search()`.
In our case, this search should not return product X because there is an `ir.rule` that hides product not in the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/product/security/product_security.xml#L34-L38
But the `website` module has some particular rule about setting the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/website/models/ir_http.py#L249-L261
So, in our case, since the user does not have company B in its allowed companies, then
`allowed_company_ids` = Company A. So `('company_id', 'parent_of', company_ids)` is trucy and the product is displayed
# Proposed solution
Doing the search with `with_company` raise an AccessError because the company is not present in the allowed_companies. Chaging the allowed companies logic seems risky because it
may lead to unintended side effects.
We instead enforce the website's company in the search's domain
opw-6115647
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update resolves an issue where tax amounts were incorrectly being added to invoice base amounts when tax information was missing. This ensures accurate tax calculations and reporting for UBL invoices, improving financial data integrity. The change is a straightforward fix to the underlying code.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that when reserving stock for packaged products, the system correctly considers the available quantity of full packages. Previously, a large stock of full packages was incorrectly ignored, leading to inaccurate reservation calculations. This fix now accurately respects the 'Reserve Only Full Packagings' setting.
Original PR description
Issue ----- Forced full packaging reservation setting is ignored when there is a big quant in stock. Steps to reproduce ----- - Enable packagings - Create a product category "Super Category" -…
Issue
-----
Forced full packaging reservation setting is ignored when there is a big quant in stock.
Steps to reproduce
-----
- Enable packagings
- Create a product category "Super Category"
- Reserve Packagings: Reserve Only Full Packagings
- Create a stored product "AAA"
- Product Category: Super Category
- 50 units on hand
- Packaging: 6-Pack (6 units)
- Create a delivery for 15 units of AAA
> Reservation is made for 15 units
Cause
-----
The rounding to a multiple of the packaging quantity takes the stock quant into account. For our example case, we have 8 full 6-Packs on hand, so the `available_quantity` gets set to 48 when doing
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L923-L925
This leads to the reservation quantity being min(15, 48) = 15
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L927
-----
Ticket:
opw-5974333
Forward-Port-Of: odoo/odoo#257342This update fixes a slow performance issue that occurred when Odoo fetched inventory data based on 'onchange' events. Specifically, when a user changed a product's lot or serial number, Odoo was retrieving all related inventory records without a limit, leading to delays. This change ensures that Odoo respects the defined limit during these fetches, resulting in significantly faster response times.
Original PR description
## Problem: During an `onchange` call, if a field is defined in the `fields_spec` with a `limit` attribute, the `fetch` method doesn't respect it, and will fetch all records satisfying the domain. In certain circumstances, this leads to slow requests. ## Solution: Enforce the `limit` when fetching if it is present. ## Steps to reproduce: - Have a product with many quant records 1. Open a picking for this product in Barcode 2. Change the lot/serial The frontend will send an `onchange` request that includes `product_stock_quant_ids` in the `fields_spec` (with default `limit` 40). Odoo will fetch all quants for this product regardless of the limit, and the request will take a while to resolve. ## Benchmark: <table> <thead> <tr> <th># of quants</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>17193</td> <td>~9s</td> <td>~400ms</td> </tr> </tbody> </table> opw-6041705 Forward-Port-Of: odoo/odoo#259983
This update corrects a bug where the tax amount on purchase bills was incorrectly reset to a default value. The issue stemmed from how the system recomputes taxes after price adjustments on bills, specifically during the bill confirmation process. This fix ensures the tax amount accurately reflects the manual setting.
Original PR description
**Steps to reproduce:** - create a storable product avco auto - make sure that a purchase tax is set in 'General Information' - create and confirm a PO for 30 quantities with a price of 0 - receive…
**Steps to reproduce:** - create a storable product avco auto - make sure that a purchase tax is set in 'General Information' - create and confirm a PO for 30 quantities with a price of 0 - receive the products - create and validate a delivery for 10 units of the product - from the PO create the bill - set a date and save - set a price of 100 - on the Bill set the total tax at 500 (it's bellow 'untaxed amount' on the bottom right of the bill and should be 450 before you change it, if the tax is 15%) - confirm the bill **Current behavior:** The total tax was reset to 450 **Expected behavior:** It should stay 500 as it was manually set **Cause of the issue:** The total tax amount is computed based on the tax lines in Journal Items https://github.com/odoo/odoo/blob/2744396733bb3ad60813e9e093d67192c0d38b36/addons/account/models/account_move.py#L1171 So the problem is actually that a recomputation of the balance of the tax account.move.line (the one with the account "tax paid" in journal items) is triggered when we confirm the Bill. That's because : When we confirm the bill, because the price is different than the one on the PO, _apply_price_difference does 2 things : (1) it creates an svl (with corresponding amls) for the quantities that are still in stock (here 20) (2) it adds amls on the bill (crediting stock interim received and debiting expense) to compensate the cogs deficit for the already out of stock quantities (here 10). cf https://github.com/odoo/odoo/pull/126536 for more details When we create those amls from (2), the create method from account.move.lines calls super() inside a context manager calling _sync_dynamic_lines(). https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move_line.py#L1628-L1635 the yield of sync_dynamic_lines() is inside a context manager calling _sync_tax_lines. https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move.py#L3250 Therefore, the first half of sync_tax_lines() (untill the yield) is ran before the call to super and the rest (from the yield) is ran after the call to super. Because we added two lines in the account.move, get_changed_lines will return those 2 new line and because there is a tax_ids on the new lines round_from_tax will be False. https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move.py#L3034-L3041 Therefore we won't reach continue. https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move.py#L3055-L3059 And the tax line will be recomputed using _prepare_tax_line() https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move.py#L3065 Here is why there is a tax_ids on the new lines : The field is precompute so if we don't set a value for it, _compute_tax_ids will be ran to compute it. As the account move on which the lines are added is a bill, the tax_ids will the supplier_tax_id of the product. https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move_line.py#L898-L901 **Fix:** There is no need for a tax_ids on these lines as they are not meant to (and should'nt) impact the taxes. opw-5413798