Daily updates from Odoo
Friday, April 17, 2026
89 changes
23 changes
Enhancements to existing features
This update simplifies the Balance Sheet in both the generic and US versions of Odoo, making it clearer to distinguish between 'Earnings' and 'Equity'. The changes enhance the chart of accounts to better track the allocation of earnings, providing a more organized view of financial reporting.
Original PR description
Simplifying the structure of the Balance Sheet in order to distinguish clearly **Earnings** and **Equity**, in the generic and US balance sheet. Improving the generic and us charts of accounts to better highlight the account pair for the allocation of earnings. task-6053852 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259485 Forward-Port-Of: odoo/odoo#256674
This update enhances the accuracy of product imports by making the matching process case-insensitive and using a similarity ratio. Previously, exact matches were required, leading to missed products. Now, a 90% similarity threshold is used to find more relevant matches, improving data import reliability.
Original PR description
Before this commit: - Product retrieval during import relied on exact name match and substring (ilike) search. - Exact name search was case sensitive, so values like `Network Cable` would not match…
Before this commit: - Product retrieval during import relied on exact name match and substring (ilike) search. - Exact name search was case sensitive, so values like `Network Cable` would not match `Network cable`. - Substring matching could return unrelated products (e.g. `Wireless bluetooth speaker` gets matched with `Wireless bluetooth speaker battery`), leading to unrelated matches. After this commit: - Exact name search is now case insensitive, allowing matches such as `Network Cable` and `network cable`. - Substring based matching has been replaced with a similarity ratio (90%) to reduce false positives and improve matching reliability against customer database product names. Technical: - Replaced `=` with `=ilike` in the exact name search domain to make the lookup case insensitive. - Similarity ratio is computed using Python's `difflib.SequenceMatcher` on product names, with a minimum threshold of 90% to qualify as a match. - Added system parameter for configurable product name similarity threshold. task-5951469 Forward-Port-Of: odoo/odoo#258709 Forward-Port-Of: odoo/odoo#252147
This update automatically handles new offer amendments as contract revisions, ensuring accurate tracking of employee contracts. It proactively archives outdated versions and provides a warning to users, preventing data conflicts and maintaining data integrity. The changes improve the system's ability to manage evolving salary agreements.
Original PR description
**Contract Amendment & Versioning Logic** * When an offer's contract start date falls within an existing contract period, it is treated as a contract amendment (new version) rather than a new…
**Contract Amendment & Versioning Logic** * When an offer's contract start date falls within an existing contract period, it is treated as a contract amendment (new version) rather than a new contract. * For contract amendments, the offer's contract end date is read-only and automatically inherited from the existing contract. * When creating a new offer, any existing versions with effective dates **on or after** the new offer's contract start date are automatically archived, as they likely contain outdated data. * Added a warning to notify users when a new offer will replace existing future versions. **Technical Refactoring** * Simplified the `employee_version_id` computation by delegating to the existing `_get_version` method on the employee model. This ensures the selected employee version correctly matches the contractual state effective at the new offer's * Ensured cache invalidation after rollback savepoints to prevent stale data. The overridden `_get_version` in `hr_contract_salary_payroll` writes to `employee.version_id` and the `contract_template_id`; although rolled back, it polluted the cache. We now always invalidate the cache after rollbacks to avoid inconsistencies, including later module installation. **Simulation & Chatter** * Inside the simulation, when calling `_get_version`, we need to adjust the contract dates of the version being simulated. The main challenge is allocating this simulated version between existing employee versions without creating contract overlaps, since overlaps raise validation errors. * To avoid this issue, we move to a new approach. We archive all versions after `employee.version_id` and set `employee.version_id.contract_date_end = False`. * Then, instead of replacing the active version, we create the simulation version as an amendment to `employee.version_id`. The amendment's effective date is set to `max(fields.Date.today(), employee.version_id.contract_date_start, self.contract_start_date)` + 1 day. This ensures the current version remains unchanged, avoids contract overlaps, and prevents chatter pollution. task: 5408192 Forward-Port-Of: odoo/enterprise#103846
This update simplifies the balance sheet reports to clearly separate 'Earnings' and 'Equity' accounts, enhancing financial reporting clarity. The changes improve the presentation of key financial data in both the standard and US versions of the balance sheet, making it easier to understand financial performance.
Original PR description
Simplifying the structure of the Balance Sheet in order to distinguish clearly **Earnings** and **Equity**, in the generic and US balance sheet. Improving the generic and us charts of accounts to better highlight the account pair for the allocation of earnings. task-6053852 Forward-Port-Of: odoo/enterprise#114012 Forward-Port-Of: odoo/enterprise#112499
Resolved issues and error corrections
This update adjusts how Odoo assigns leads to sales team members. Previously, team members with specific preferences received too many low-probability leads. Now, leads are prioritized by probability, ensuring the most suitable team members receive the highest-quality opportunities, leading to better sales efficiency.
Original PR description
Since we've added the preferred domain field, the leads are firstly assigned to members matching the preffered domain. The issue with this behavor is that a memeber with prefered domain can get a lot of leads with low probability because they match his preferred domain. So we process the leads in the order of probabilities and if it match a preferred domain, it'll be assigned to the member, and if not we choose one without the matching preferred domain. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that table assignments are consistently synchronized across all devices within a POS session. Previously, a waiter selecting an empty table wouldn't update its status on other devices. This fix corrects this issue, improving the accuracy of table availability information for all users.
Original PR description
When a waiter selects a table without adding any items and returns to the floor screen, the table appears as occupied (green) on their device but not on other devices in the same POS session. Steps to reproduce: ------------------- * Open POS session on device A * Open same POS session on device B * On device A: click a table, don't add items, go back to floor * On device B: observe the table does not appear as occupied > Observation: Empty table assignments were not being synced to the server, so other devices couldn't detect the table occupancy. Why the fix: ------------ Also treat orders with a table_id as pending so they sync immediately when a table is opened. The backend already supports this: pos.order can be created with just table_id, and pos_restaurant._get_open_order looks orders up by table_id for table-based sync. opw-5236119 Forward-Port-Of: odoo/odoo#241321
This update clarifies ledger reports by displaying the company name alongside each journal when selecting journals within a journal group. Additionally, the system now includes archived journals in ledger calculations, ensuring more complete financial reporting across multiple companies. This enhancement improves data accuracy and provides a more comprehensive view of financial activity.
Original PR description
In multi-company, when choosing the included journals of a journal group, display the name of the journal's company before the journal name. Also, add the 'active_test=False' context for the journal in the ledgers in order that ledgers also take into account the archived journals. task-6111366 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a limitation where users couldn't edit images (resize, crop, etc.) when replacing them on product pages. The change ensures that editing options are only displayed for images that are *not* recently uploaded, streamlining the user experience and preventing unexpected behavior. This improves the visual consistency of product listings.
Original PR description
## Context On the website page of a product, users can transform a picture in various ways (shape, size, cropping, etc.) when uploading it. ## Issue When uploading a new picture, users can only…
## Context On the website page of a product, users can transform a picture in various ways (shape, size, cropping, etc.) when uploading it. ## Issue When uploading a new picture, users can only replace the image or reorder it, but they cannot reshape it, crop it, or edit its size. ## Steps to reproduce 1. Install the *eCommerce* (`website_sale`) app. 2. Create a product and set a picture for it. 3. Go to that product's page in the Website app and open the website editor. 4. Click on the picture and replace it. 5. **The options to transform the picture are not displayed.** ## Cause The transformation options are disabled due to the following static `exclude` variable in `ImageToolOption`: https://github.com/odoo/odoo/blob/2b6b937c1c6d92e4e8b4657ae62127f0f8a7eb56/addons/html_builder/static/src/plugins/image/image_tool_option.js#L16 ## Solution We should prevent the transformation options from being displayed **only** when the image is external. In such cases, certain options from the `ImageToolOption` (such as the `ImageTransformOption` or the `ImageShapeOption`) cannot be applied. This is confirmed by the message displayed when trying to crop an external image: https://github.com/odoo/odoo/blob/2b6b937c1c6d92e4e8b4657ae62127f0f8a7eb56/addons/web_editor/static/src/js/wysiwyg/widgets/image_crop.js#L164-L173 We can determine whether an image is external by looking at its `data-attachment-id` property. If it is present, the image was recently uploaded to Odoo. On top of updating the `exclude` variable, we need to filter out the options that cannot be used on images from the eCommerce. These options are: - Description - Tooltip - Transform (*"Transform the picture"*) - Size ## Tests The test checks that the behavior matches the one from previous versions: the options to edit an image are not displayed before replacing the image, but are displayed after. Both the test `image field should not be editable, but the image can be replaced` (shown below) and the new test from this PR fail if the modified `exclude` variable allow to edit the image before replacing it. https://github.com/odoo/odoo/blob/dea5a1d28a1935c2b4d87c3c6e8c07cd874c7d6b/addons/html_builder/static/tests/image_field.test.js#L7-L16 ## Options displayed | | Before this commit | After this commit | Previous versions | |---|---|---|---| | **Before replacing the image** | Media, Re-order | Media, Re-order | Media, Re-order | **After replacing the image** | Media, Re-order | Media, Re-order, Shape, Transform (crop), Filter, Format, Quality | Media, Re-order, Shape, Transform (crop), Filter, Format, Quality opw-5251864 Forward-Port-Of: odoo/odoo#247706 Forward-Port-Of: odoo/odoo#241071
This update fixes an issue where the average cost calculation in the 'Inventory at Date' report was inaccurate for products using the AVCO cost method. The fix ensures that the average cost is correctly calculated based on actual transactions, preventing discrepancies in inventory valuation. This improves the reliability of stock reporting.
Original PR description
When we open the Stock report at date, we filter out moves anterior to that date and, if the cost method is AVCO, Odoo recompute the `avg_cost` up to that point of time with `_run_average_batch`. However, when iterating over the moves, `move._get_value(at_date)` might return a value calculated from the current standard_price if the move is not associated with any accounting entry or PO/SO. Steps to reproduce the issue: 1. Create a new product with AVCO cost method 2. On the product form, set the cost to 5$ 3. Manually adjust the inventory to 5 units 4. Create a PO and receive 5 products at a unit cost of 10$ > Total value: 75$ > Total quantity: 10 units > avg_cost: 7.5$ 5. Navigate to Stock report and run "Inventory at Date" at current time 6. avg_cost is 8.75$ instead of 7.5$ Ticket: opw-5951072 Forward-Port-Of: odoo/odoo#253659
This update fixes an issue where refund orders paid with eWallet top-ups weren't correctly identified as refunds, leading to incorrect invoice generation. The fix ensures that refund flows, including those using eWallet, are accurately processed, producing the correct accounting documents and tax calculations. This improves the reliability of our point-of-sale accounting.
Original PR description
[FIX] point_of_sale: detect refund+eWallet orders as refunds for invoice signs Refund orders paid through eWallet top-up can have a net total of 0, which made refund detection based only on negative…
[FIX] point_of_sale: detect refund+eWallet orders as refunds for invoice signs Refund orders paid through eWallet top-up can have a net total of 0, which made refund detection based only on negative totals inconsistent. As a result, some refund flows were treated as normal invoices and refund tax/invoice signs were incorrect. Steps to reproduce: ------------------- * Configure an eWallet program in POS. * Create and pay a POS order for one product, then invoice it. * Refund that order and choose eWallet as refund payment method (refund + top-up). * Validate and inspect the generated accounting document. > Observation: The refund flow may not be consistently treated as a refund when the order’s net amount is 0, causing incorrect invoice move type/sign handling and wrong tax booking behavior. Why the fix: ------------ Refund detection now also relies on `refunded_order_id` in key paths: * `_compute_prices`: apply refund factor when order is linked to a refunded order (or already negative), so totals/taxes keep refund semantics. * `_prepare_invoice_vals`: create `out_refund` when the order is linked to a refunded order (or has negative total), ensuring a credit note is produced. * `_prepare_base_line_for_taxes_computation`: consider refund context with `is_refund` or negative total for tax base sign consistency. This keeps existing negative-total refund behavior while correctly handling refund+eWallet cases where the arithmetic total can be 0. opw-5426818 Forward-Port-Of: odoo/odoo#259217 Forward-Port-Of: odoo/odoo#247948
This update fixes an issue where the unit cost of products was incorrectly calculated when considering stock held in internal locations like subcontracting warehouses. The change ensures accurate valuation by properly accounting for all relevant stock locations, leading to more reliable inventory reporting. This resolves discrepancies in reported values.
Original PR description
This commit addresses two valuation issues with respect to transit/internal locations without specific warehouses (such as the subcontracting location): 1. The `avg_cost` (unit cost) of products can…
This commit addresses two valuation issues with respect to transit/internal locations without specific warehouses (such as the subcontracting location): 1. The `avg_cost` (unit cost) of products can drastically differ from its expected value since the valued quantity considered in the product total value is not necessarily the `qty_available` but the avg cost is computed as such: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L272-L273 2. The `value` of stock.quants is unexpectedly impacted by the quantity present these other locations for the same reasons: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/stock_quant.py#L57-L65 ### Steps to reproduce: - In the settings enable Multi-Steps Routes - Create a storable with an avco perpetual valuation with a cost of 5$ - Click the `On hand` smart button > Update Quantity - Put 1 unit in WH/Stock and 2 units in Subcontracting - Go to Inventory > Reporting > Stock #### > The unit cost of your product is 15$ instead of 5$ - Click on locations on the line and remove the `internal` filter #### > The value in WH/Stock is 15$ instead of 5$ and the one in Subcontracting is 30$ instead of 10$ ### Cause of the issue: The total value of a product is computed with an additional valuation context in order to consider valuated locations and dates properly: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L202-L205 https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L231-L247 https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L264-L266 However, the `avg_cost` is computed by dividing this total value by the `qty_available` with apriori completely different context: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L271-L273 In teh present use case, the `qty_available` outside of the valuation context is 1, while the valuated quantity was 3 (as it did consider all of the internal valuated locations (e.g. Subcontracting)) because of these lines: https://github.com/odoo/odoo/blob/93095e1e9507fde18aefe91aac8c9cb53cadc2f3/addons/stock_account/models/product.py#L202-L205 https://github.com/odoo/odoo/blob/93095e1e9507fde18aefe91aac8c9cb53cadc2f3/addons/stock_account/models/product.py#L361-L363 ### Additional issue: The variable definition in this loop is incorrect: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L251-L262 Since `prodcuts` is defined just above: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L202-L205 and is expected to be used as such unaltered: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L264-L266 In particular, the current variable declaration lead only to a valid process of the last `cost_method` group. As this variable is only introduced for the purpose of the loop computation we rename it. opw-5959720 opw-5883980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257103
This update resolves an issue where the chat composer on mobile devices would become unresponsive when the mobile menu was open. The fix prevents the mobile menu from stealing focus from the composer, ensuring users can consistently access and use the chat feature. This improves the mobile user experience.
Original PR description
**Description of the issue this PR addresses:** On mobile devices, the chat composer becomes unresponsive when the navigation menu `navbar-toggler` is open.…
**Description of the issue this PR addresses:** On mobile devices, the chat composer becomes unresponsive when the navigation menu `navbar-toggler` is open. https://github.com/user-attachments/assets/8ef01ec6-4a44-41d3-8b86-74f68caf47ef Steps to reproduce: 1. Open the website in a mobile view. 2. Tap the navbar toggler to open the mobile menu. 3. Without closing the menu, open the chat window. 4. Tap on the message composer text area. → The composer is not accessible. This happens because the bootstrap `Offcanvas` (used by the `navbar-toggler`) traps focus by listening for `focusin` events bubbling up to the document. When the composer is tapped, the Offcanvas intercepts the event and immediately steals focus back to itself, dismissing the virtual keyboard. This commit stops the event propagation at the composer level, ensuring the composer can reliably retain focus in responsive views without interference from active menus. Task-[5954657](https://www.odoo.com/odoo/project/1519/tasks/5954657) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259486 Forward-Port-Of: odoo/odoo#250294
This update fixes an issue where offline POS orders were incorrectly having their payment dates automatically updated to the current date. Previously, when these orders were imported into the POS system, the payment date would be overwritten. This change ensures that the original, saved payment date for offline orders is preserved, improving order accuracy and preventing potential discrepancies in reporting.
Original PR description
Before this commit, saved orders that were captured offline, would have their payment_date overridden to the current date when they were loaded in the POS. opw-6117966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259114
This update fixes an issue where MyInvois was incorrectly reducing invoice amounts due to pre-payments on individual POS e-invoices. The change ensures the Total Amount Payable accurately reflects the e-document's total amount, aligning with MyInvois requirements and preventing discrepancies.
Original PR description
For individual POS e-invoices, the PrePayment Amount was mapped to the payment linked to the invoice. This incorrectly decreased the Total Amount Payable to 0, since POS orders are already paid at the counter. MyInvois tax officer and helpdesk requires that the Total Amount Payable (cbc:PayableAmount) to reflect the total amount of the issued e-document, regardless of prior payments. This commit forces the PaidAmount to 0 for individual POS e-invoices, ensuring the PayableAmount correctly matches the TaxInclusiveAmount as expected by the MyInvois API. task-6057187 Forward-Port-Of: odoo/odoo#259339 Forward-Port-Of: odoo/odoo#258824
A technical issue causing negative values in the Luxembourg tax report has been resolved. The formula for a specific tax line (226) was incorrectly calculated, leading to inaccurate reporting. This update corrects the formula to ensure accurate tax reporting for Luxembourg companies.
Original PR description
Steps to reproduce: - Install `l10n_lu` module - Switch to `LU Company` - Create a invoice and in journal items use tax grid `226` - Open the Tax Report and check the line `226 - Supplies carried out within the scope of the special arrangement of art. 56sexies` - The value appears negative instead of positive. Cause: This issue is caused by the major tax revamp introduced in version 19 [commit]. The credited amount is currently displayed as a negative value, which is incorrect, it should be shown as positive. Solution: To resolve this issue, the formula has been modified from `226` to `-226`. [commit]: https://github.com/odoo/odoo/commit/17a6117ed88c29b5bc4db0c872bcdbc109a7d98b#diff-3441c5d05315ec0562923797f973eae66488452a6772d23e198998c1890aa06c opw-6050665 Forward-Port-Of: odoo/odoo#259388
This update resolves an access error that prevented users from correctly adding TDS entries when working within a branch company setup in India. The fix ensures the system uses the correct company ID for currency calculations, granting the necessary permissions for branch operations. This improves functionality for businesses operating with multiple company branches.
Original PR description
**Steps to reproduce:** * Install the **l10n_in** module. * Create a **branch company** under an Indian company. * Switch to the branch company only. * Create a user with **Accounting Administrator**…
**Steps to reproduce:** * Install the **l10n_in** module. * Create a **branch company** under an Indian company. * Switch to the branch company only. * Create a user with **Accounting Administrator** access (and bank validation rights) and also give permission of this branch company. * Login from this user . * Create and confirm a vendor bill in the branch company. * Click **TDS Entry** and select any TDS section. **Observed behavior:** * An **AccessError** is raised when selecting the TDS section. **Cause:** * In `_compute_amount` (wizard), currency is taken from `tax_id.company_id`. * For branch setups, taxes (and related accounts) belong to the **parent company**, so `tax_id.company_id` points to the parent. * The user operating in the branch company does not have access to the parent company, triggering an access error. **Fix:** * Use the wizard’s `company_id` instead of `tax_id.company_id` when determining currency. * The wizard `company_id` is correctly computed based on the active company, ensuring proper access rights. **Note:** * Regression test is not feasible due to ORM cache behavior: * In tests, `mock` environments share a transaction-level cache. * `compute_sudo=True` fields populate cache with superuser access. * By the time `_compute_amount` runs, values are already cached. * No database fetch occurs, so record rules are not evaluated and the AccessError cannot be reproduced. opw-6095312 Forward-Port-Of: odoo/odoo#259091
A bug was causing mobile self-orders to incorrectly appear in order lists for different Point of Sale (PoS) configurations within the same company. This fix corrects a filtering issue that was pulling in orders from all configurations, ensuring that mobile orders are only displayed within their intended PoS setup (kiosk or trusted).
Original PR description
Steps to reproduce ------------------ 1. Have two PoS configs in the same company (e.g. Bar with QR+ordering and Restaurant) 2. Open Bar, go to its self-order mobile menu, place an order 3. Go back,…
Steps to reproduce ------------------ 1. Have two PoS configs in the same company (e.g. Bar with QR+ordering and Restaurant) 2. Open Bar, go to its self-order mobile menu, place an order 3. Go back, open Restaurant, click on Orders tab -> The Bar's self-order shows up in the Restaurant's order list. What's happening ---------------- In the `getServerOrders` override added by 6782262a4d96, the domain used to fetch tableless self-orders filters by `company_id` instead of `config_id`, so it pulls in self-orders from ALL configs in the company. But we only want self-orders that are of type "kiosk" to be shown in other configs, while the ones of type "mobile" should only be shown in the config they belong too (or a trusted config). The fix ------- We adjust the domain by stop fetching company-wise mobile orders in other configs, we only keep fetching the kiosk ones. Note that mobile ordres belonging to the current config (or trusted ones) are still fetches in the main `getServerOrders` method. opw-6068187 Forward-Port-Of: odoo/odoo#258712
This update ensures that live chat agents can consistently see and use the live chat button while actively engaged in existing conversations. Previously, agents couldn't initiate new chats while already part of an active live chat. This improvement streamlines the user experience for live chat support.
Original PR description
Previously, users who were part of active livechats as agents could not see the livechat button to start a new conversation. This change ensures the button remains visible so users can start additional livechats as a visitor. task-[5119098](https://www.odoo.com/odoo/project/1519/tasks/5119098) Forward-Port-Of: odoo/odoo#258884 Forward-Port-Of: odoo/odoo#253894
This update resolves an issue where date filters in financial reports were incorrectly displaying calendar year ends when using custom fiscal periods. The fix ensures that reports accurately reflect the user-defined fiscal year, improving the reliability of financial data presented to users. This change impacts how financial reports are generated and interpreted.
Original PR description
To reproduce, we set a fiscal year in the settings for instance(31 March). Next, we open the balance sheet and in the report settings, disable use_fiscal_periods. Then back on the report, we open the date filter and set a custom date to the fiscal year end. This would show the calendar year end. This is because when we are in a custom period, we try to infer a period from the user input.
This update addresses a regulatory requirement in Mexico regarding electronic payments (CFDI). The system now prevents users from registering payments with future dates, which were previously allowed and not compliant with government regulations. This ensures accurate reporting and avoids potential issues with tax authorities.
Original PR description
To sign a payment registered in the future is not allowed by the government. See http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/Guia_llenado_pagos.pdf Steps: - Create a PDD invoice (the due date should be at least 1 month later than the invoice date) - Send it to CFDI - Register a payment in the future -> We have the 'Update payments' button that appear on the invoice view, if you clik on it the payment will be signed With this commit, we filter out the payments with a future date, that way we don't have the 'Update Payments' button if there are only future payments, or the future payments won't be taken into account when clicking on the button. opw-5934753 Forward-Port-Of: odoo/enterprise#114038 Forward-Port-Of: odoo/enterprise#112320
This update addresses an issue where delivery confirmations were failing due to missing tracking data from Easypost. The fix prevents errors when tracking information is unavailable, ensuring accurate picking validation and correct shipping creation in Easypost. Easypost support suggested a slight delay between order placement and tracking retrieval as a potential workaround.
Original PR description
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs…
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs with error: TypeError: 'NoneType' object is not subscriptable. As a result the picking is not validated in odoo but a shipping has succesfully been created in the easypost backend. Solution: Prevent traceback form happening, picking gets correctly validated and carrier_tracking_url field is empty. Transcript from Easypost support: << I'm also seeing the tracker showing as null when reviewing the response. I'll go ahead and create a ticket for the engineering team to investigate. I can see that the tracking code is being returned in the request, but the full tracking object is not. Since this appears to be happening on a case-by-case basis, you may want to allow more time between the BUY and the GET requests, as I noticed they are being triggered very close together. I'm not certain if that's related, but it may be worth trying as a troubleshooting step while we have this under review. >> opw-5402415 Forward-Port-Of: odoo/enterprise#111833
A technical issue causing negative values in the Luxembourg tax report's calculations has been resolved. The formula was incorrectly referencing a negative value, leading to inaccurate reporting. This update corrects the formula to display credited amounts as positive values, ensuring accurate tax reporting for Luxembourg companies.
Original PR description
Steps to reproduce: - Install `l10n_lu` module - Switch to `LU Company` - Create a invoice and in journal items use tax grid `226` - Open the Tax Report and check the line `226 - Supplies carried out within the scope of the special arrangement of art. 56sexies` - The value appears negative instead of positive. Cause: This issue is caused by the major tax revamp introduced in version 19 [commit]. The credited amount is currently displayed as a negative value, which is incorrect, it should be shown as positive. Solution: To resolve this issue, the formula has been modified from `226` to `-226`. [commit]: https://github.com/odoo/odoo/commit/17a6117ed88c29b5bc4db0c872bcdbc109a7d98b#diff-3441c5d05315ec0562923797f973eae66488452a6772d23e198998c1890aa06c opw-6050665 Forward-Port-Of: odoo/enterprise#113952
This update fixes an issue where subscription invoices were incorrectly calculating due dates when upsells with deferred payment dates were present. The change prevents upsell invoice lines from influencing the next invoice date calculation, ensuring accurate and timely billing for subscription customers.
Original PR description
When we compute the next invoice date of a subscription, we are checking all account move lines of the invoices linked to the subscription. But if we have an upsell with a deffered date higher than the next invoice date that should be calculated, it will set a too high next invoice date. To avoid this issue, we don't take into account the invoice lines linked to upsell to compute the next invoice date Forward-Port-Of: odoo/enterprise#113170
18 changes
Enhancements to existing features
This update simplifies the creation of Spanish tax reports (303 and 347) for users. Specifically, the 'exonerated from 390' field is now automatically displayed on the print wizard for recent periods, eliminating manual setup. Additionally, the annual report 347 now groups data by move type and date for enhanced audit capabilities.
Original PR description
In this PR: - In tax report 303, the 'exonerated from 390' boolean field is now visible on the print BOE wizard , when period is either last month or last quarter so that user does not have to enable it manually on the AEAT page. - In the annual tax report 347, when a user clicks to audit the operations of the entity, a new group by is added in context to group the reports by move type and date(quarter). task-5863744 Forward-Port-Of: odoo/enterprise#113644 Forward-Port-Of: odoo/enterprise#108057
Resolved issues and error corrections
This update fixes an issue where individual POS e-invoices were incorrectly showing a zero Total Amount Payable. The change ensures that the payable amount accurately reflects the total e-document amount, as required by the MyInvois tax officer and helpdesk. This prevents discrepancies in the data sent to MyInvois.
Original PR description
For individual POS e-invoices, the PrePayment Amount was mapped to the payment linked to the invoice. This incorrectly decreased the Total Amount Payable to 0, since POS orders are already paid at the counter. MyInvois tax officer and helpdesk requires that the Total Amount Payable (cbc:PayableAmount) to reflect the total amount of the issued e-document, regardless of prior payments. This commit forces the PaidAmount to 0 for individual POS e-invoices, ensuring the PayableAmount correctly matches the TaxInclusiveAmount as expected by the MyInvois API. task-6057187 Forward-Port-Of: odoo/odoo#259339 Forward-Port-Of: odoo/odoo#258824
This update fixes an issue where the unit cost of products was incorrectly calculated when considering stock held in internal locations like subcontracting warehouses. The change ensures accurate valuation by properly accounting for all relevant inventory locations, leading to more reliable inventory reporting.
Original PR description
This commit addresses two valuation issues with respect to transit/internal locations without specific warehouses (such as the subcontracting location): 1. The `avg_cost` (unit cost) of products can…
This commit addresses two valuation issues with respect to transit/internal locations without specific warehouses (such as the subcontracting location): 1. The `avg_cost` (unit cost) of products can drastically differ from its expected value since the valued quantity considered in the product total value is not necessarily the `qty_available` but the avg cost is computed as such: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L272-L273 2. The `value` of stock.quants is unexpectedly impacted by the quantity present these other locations for the same reasons: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/stock_quant.py#L57-L65 ### Steps to reproduce: - In the settings enable Multi-Steps Routes - Create a storable with an avco perpetual valuation with a cost of 5$ - Click the `On hand` smart button > Update Quantity - Put 1 unit in WH/Stock and 2 units in Subcontracting - Go to Inventory > Reporting > Stock #### > The unit cost of your product is 15$ instead of 5$ - Click on locations on the line and remove the `internal` filter #### > The value in WH/Stock is 15$ instead of 5$ and the one in Subcontracting is 30$ instead of 10$ ### Cause of the issue: The total value of a product is computed with an additional valuation context in order to consider valuated locations and dates properly: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L202-L205 https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L231-L247 https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L264-L266 However, the `avg_cost` is computed by dividing this total value by the `qty_available` with apriori completely different context: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L271-L273 In teh present use case, the `qty_available` outside of the valuation context is 1, while the valuated quantity was 3 (as it did consider all of the internal valuated locations (e.g. Subcontracting)) because of these lines: https://github.com/odoo/odoo/blob/93095e1e9507fde18aefe91aac8c9cb53cadc2f3/addons/stock_account/models/product.py#L202-L205 https://github.com/odoo/odoo/blob/93095e1e9507fde18aefe91aac8c9cb53cadc2f3/addons/stock_account/models/product.py#L361-L363 ### Additional issue: The variable definition in this loop is incorrect: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L251-L262 Since `prodcuts` is defined just above: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L202-L205 and is expected to be used as such unaltered: https://github.com/odoo/odoo/blob/1cf08a339c4b46d23c58beecb563b3438e64f0e3/addons/stock_account/models/product.py#L264-L266 In particular, the current variable declaration lead only to a valid process of the last `cost_method` group. As this variable is only introduced for the purpose of the loop computation we rename it. opw-5959720 opw-5883980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257103
This update resolves an issue where the checkout process became unresponsive when using the l10n_br_avatax_sale module with CPF identification. The previous implementation unnecessarily called external tax APIs, leading to errors and a broken confirmation step. This fix removes the problematic API call, ensuring a smoother checkout experience.
Original PR description
Issue: --- The extra external_tax call introduced in odoo/enterprise#101579 is causing multiple issues: 1- It doesn't catch errors while `_get_and_set_external_taxes_on_eligible_records` easily raises errors, causing uncatch errors in `website_sale`. 2- Extra unnecessary external api call in non-express checkout methods which is not desirable. Steps to reproduce: --- 1- Install l10n_br_avatax_sale, website_sale 2- Using a public user, add a product to cart and got to checkout. 3- In the address form, use CPF identification type. Outcome: The confirm button is unresponsive. Cause: --- This is due to uncatch error raised by external tax call, while it was not necessary at this step of this flow to call external tax api. opw-6005767 Forward-Port-Of: odoo/odoo#259522 Forward-Port-Of: odoo/odoo#256692
A technical issue in the Luxembourg tax reporting module (l10n_lu) was causing negative values to appear for certain tax lines. This update corrects a formula change, ensuring that credited amounts are displayed accurately as positive values in the tax report. This ensures correct tax reporting for Luxembourg businesses.
Original PR description
Steps to reproduce: - Install `l10n_lu` module - Switch to `LU Company` - Create a invoice and in journal items use tax grid `226` - Open the Tax Report and check the line `226 - Supplies carried out within the scope of the special arrangement of art. 56sexies` - The value appears negative instead of positive. Cause: This issue is caused by the major tax revamp introduced in version 19 [commit]. The credited amount is currently displayed as a negative value, which is incorrect, it should be shown as positive. Solution: To resolve this issue, the formula has been modified from `226` to `-226`. [commit]: https://github.com/odoo/odoo/commit/17a6117ed88c29b5bc4db0c872bcdbc109a7d98b#diff-3441c5d05315ec0562923797f973eae66488452a6772d23e198998c1890aa06c opw-6050665 Forward-Port-Of: odoo/odoo#259388
This update corrects a problem where electronic invoices (FatturaPA) generated with units of measure containing special characters (like m² or m³) failed validation. The fix ensures these units are properly formatted before being included in the XML, guaranteeing compliance with Italian tax regulations and preventing invoice rejection.
Original PR description
### Issue before this commit: When generating the electronic invoice XML (FatturaPA) with units of measure containing non-standard Unicode characters (e.g. m², m³), the resulting XML fails…
### Issue before this commit: When generating the electronic invoice XML (FatturaPA) with units of measure containing non-standard Unicode characters (e.g. m², m³), the resulting XML fails validation, as these characters are not accepted by the SdI format. ### Steps to reproduce the issue: 1. Download Italian loc + electronic invoicing 2. Activate UoM option in settings 3. Set a product UoM in any unit that has an apex/power of (ex. m2, m3) 4. Invoice this product 5. Create the XML for SdI 6. Check format with Fex > apex is not recognised as a valid character ### Cause of the issue: The UoM name is exported as-is into the XML. Non-standard Unicode characters are preserved during formatting and are not compatible with the allowed character set defined by the FatturaPA specifications. ### Reason to introduce the fix: Ensure that units of measure are normalized into a compatible representation before being included in the XML, so that the generated file complies with SdI validation rules. opw-6075119 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259076 Forward-Port-Of: odoo/odoo#257012
This update resolves an issue where mobile self-orders were incorrectly appearing in order lists for different Point of Sale (PoS) configurations within a company. The fix ensures that mobile self-orders are only displayed within their originating PoS configuration, improving order management and preventing confusion. This change enhances the accuracy of order data across our system.
Original PR description
Steps to reproduce ------------------ 1. Have two PoS configs in the same company (e.g. Bar with QR+ordering and Restaurant) 2. Open Bar, go to its self-order mobile menu, place an order 3. Go back,…
Steps to reproduce ------------------ 1. Have two PoS configs in the same company (e.g. Bar with QR+ordering and Restaurant) 2. Open Bar, go to its self-order mobile menu, place an order 3. Go back, open Restaurant, click on Orders tab -> The Bar's self-order shows up in the Restaurant's order list. What's happening ---------------- In the `getServerOrders` override added by 6782262a4d96, the domain used to fetch tableless self-orders filters by `company_id` instead of `config_id`, so it pulls in self-orders from ALL configs in the company. But we only want self-orders that are of type "kiosk" to be shown in other configs, while the ones of type "mobile" should only be shown in the config they belong too (or a trusted config). The fix ------- We adjust the domain by stop fetching company-wise mobile orders in other configs, we only keep fetching the kiosk ones. Note that mobile ordres belonging to the current config (or trusted ones) are still fetches in the main `getServerOrders` method. opw-6068187 Forward-Port-Of: odoo/odoo#258712
This update resolves an issue where the Invoice Journal field wasn't displayed correctly when a user changed the invoice's company and only one suitable journal was available. Previously, this prevented users from updating the journal, leading to an error. Now, the Journal field will always be displayed if it differs from the single suitable journal, allowing for accurate updates.
Original PR description
…e_journal_ids and it differs from the current journal_id This resolves an issue that occurs when a user changes the invoice’s company and only one suitable_journal_ids is available. In such cases,…
…e_journal_ids and it differs from the current journal_id This resolves an issue that occurs when a user changes the invoice’s company and only one suitable_journal_ids is available. In such cases, the journal_id is not displayed, preventing the user from updating it. As a result, the following error appears: "Invoice belongs to company 'A' while 'Journal' (journal_id: 'Journal of Another Company') belongs to another company." Description of the issue/feature this PR addresses: The Invoice Journal is not displayed when the Invoice’s Company is changed, preventing the user from updating it. This leads to the error: "Invoice belongs to company 'A' while 'Journal' (journal_id: 'Journal of Another Company') belongs to another company." Current behavior before PR: When there is only one suitable Journal for the Invoice after changing the Company, the Journal field is hidden, even if the current Journal value does not match the suitable one. This prevents the user from updating the Journal. Desired behavior after PR is merged: When there is only one suitable Journal for the Invoice after changing the Company, the Journal field should be displayed if it differs from the only suitable Journal, allowing the user to update it. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259573
This update ensures payments to Viva.com are consistently confirmed, even if the connection temporarily drops. The system now automatically retries payment confirmations silently, preventing payments from being incorrectly marked as failed and ensuring accurate accounting. A notification alerts the user to connectivity issues.
Original PR description
When a payment was sent to Viva.com and the connection dropped before receiving confirmation, the polling loop in waitForPaymentConfirmation would stop because _handleOdooConnectionFailure set the payment status to "retry" and rejected the promise. This left the payment debited on Viva's side but unconfirmed in the POS. Now the polling uses a direct silent ORM call instead of _call_viva_com to avoid triggering _handleOdooConnectionFailure. On connection failure, the poll silently retries on the next interval until a definitive success/failure response is received. A one-time warning notification informs the user that connectivity was lost. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259564
This update enables quick checkout for event tickets, addressing a previous restriction that required full billing details. It recognizes that event locations are typically used for tax purposes, not customer addresses, and avoids a frustrating user experience. A system parameter allows businesses to enable or disable this feature based on their needs.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259275 Forward-Port-Of: odoo/odoo#258347
This update fixes an issue where stock quantities were incorrectly displayed for a company when a purchase order was processed through a different company in a multi-company setup. Now, stock quantities are correctly restricted based on the product's assigned company, preventing access errors and ensuring accurate reporting.
Original PR description
**Purpose:** Since a stock.quant is a combination of the stock move lines of a product and a location, it should be restricted by the product's company. **Before this commit:** In a multi-company…
**Purpose:** Since a stock.quant is a combination of the stock move lines of a product and a location, it should be restricted by the product's company. **Before this commit:** In a multi-company environment. If a purchase order with product from company 1 is being confirmed, received, and validated when company 2 is being selected as the primary active company while company 1 is also checked. It will create a stock.quant that is searchable for company 2. However, it will raise an error when company 2 is trying to access it. **After this commit:** Even if the stock.quant is created when company 2 is the primary active company, it will not be searchable for company 2 since the product's company is company 1. **Steps to Reproduce on Runbot:** - Create a storable product exclusive to Company A - Create & validate a receipt for that product in Company A. - Switch to Company B -> Reporting > Locations > Remove all filters: The negative quant for the product in Partners/Vendors is visible. opw-6082330 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259733 Forward-Port-Of: odoo/odoo#257211
This update corrects a bug in the landed cost calculation process. Previously, the system incorrectly multiplied currency rates, leading to inflated landed cost figures. The fix ensures landed costs are calculated accurately based on the correct exchange rate, resolving a discrepancy in pricing.
Original PR description
Issue introduced by commit daf196e365f481ffcc8b56664fa361fa9c9bbda9
Steps to reproduce:
- Enable two currencies (e.g., USD and EUR)
- Set exchange rate: 2 EUR = 1 USD
- Set current company currency to USD
- Create a service product "Landed Cost":
- Purchase tab:
- Mark as "Is a Landed Cost"
- Cost: $10
- Create a bill:
- Vendor: any vendor
- Currency: EUR
- Add 1 unit of "Landed Cost" → correctly shows 20 EUR
- Click the "Create Landed Cost" button
Expected behavior:
Landed cost should be calculated as $10
Actual behavior:
Landed cost is incorrectly calculated as $40, because the AML (Account Move Line) price subtotal is multiplied by the currency exchange rate (2) instead of dividing.
opw-6121706
opw-6121407
Opw-6124771
Opw-6123193
Forward-Port-Of: odoo/odoo#259632This update resolves a potential issue where Odoo could create related fields that rely on non-searchable data, leading to errors in searching, reporting, and overall system stability. By adding validation, this change ensures related fields always use stored data, improving data consistency and reliability.
Original PR description
**Steps to Reproduce:** - Create a new database. - Install any module (for example, Sale). - Go to Settings → Technical → Database Structure → Fields. - Create a new field using Studio or manually. -…
**Steps to Reproduce:**
- Create a new database.
- Install any module (for example, Sale).
- Go to Settings → Technical → Database Structure → Fields.
- Create a new field using Studio or manually.
- Set the field as a related field using a path that includes a non-stored field (e.g., product_variant_id.active where product_variant_id is non-stored). Save the field.
**Issue:**
- Odoo allows defining related fields that depend on non-stored (non-searchable) fields in the dependency chain.
- This leads to runtime issues such as:
- Cannot convert field to SQL because it is not stored
- Failures in search, domains, and reporting
- Inconsistent behavior depending on usage context
- Currently, no validation prevents users from configuring such invalid related fields.
**Solution:**
- Add validation in the related field resolution logic to ensure that all fields In the related path are stored.
- Raise a ValidationError when a non-stored field is encountered in the related path, clearly indicating the offending field and model.
This prevents invalid related field configurations at creation time and ensures data consistency and predictable behavior across ORM operations.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#259309This update resolves a crash that occurred when confirming rental orders with kit products using multiple pack locations. The change uses a safer method to handle multiple pick transfers, preventing the system from failing due to a single record requirement. This ensures smooth rental order processing for kit-based rentals.
Original PR description
Problem: When you confirm a rental order that has a kit product whose components use two different pack locations Odoo crashes with a singleton error. You get this singleton error because Odoo tries…
Problem: When you confirm a rental order that has a kit product whose components use two different pack locations Odoo crashes with a singleton error. You get this singleton error because Odoo tries to assign both picks as the `return_id` because they share the same `sale.order.line` here: https://github.com/odoo/enterprise/blob/2212b3f3f3d90894dd6351defe0d3ca090584955/sale_stock_renting/models/sale_order_line.py#L404
Purpose: Use [:1] to safely handle the case where multiple pick transfers are created, avoiding a crash when assigning return_id which expects a single record.
Steps to Reproduce on Runbot:
1. Enable mutli-step routes and rental transfers.
2. Set the warehouse to 3-step delivery.
3. Copy the existing packing location.
4. Copy the existing pick operation type and set the destination location to the new packing location.
5. Create a new route.
6. Create new rules on this new route with the following configurations:
1. Rule 1
1. Action: Pull
2. Source location: WH/Stock
3. Destination location: Partners/Customers
4. Operation type: The new pick operation type
2. Rule 2
1. Action: Push
2. Source location: New pack location
3. Destination location: WH/Output
4. Operation type: Pack
3. Rule 3
1. Action: Push
2. Source location: WH/Output
3. Destination location: Partners/Customers
4. Operation type: Delivery
7. Create 2 component products tracked by inventory, and apply the new route on one of the component products.
8. Create a new rental product with a kit, which has the 2 component products.
9. Create a new rental order for the kit product and confirm it.
opw-6026918
Forward-Port-Of: odoo/enterprise#113879
Forward-Port-Of: odoo/enterprise#112543This update fixes an issue where refunds weren't correctly reflected when calculating outstanding balances in the Point of Sale (POS) system. Previously, only regular orders were considered, leading to inaccurate due amounts. Now, refund orders with negative totals are included, ensuring accurate due calculations and a more reliable user experience.
Original PR description
Step to reproduce - install "pos_settle_due" - have a customer, A and a pos with payment method "customer Account" - start pos, add 3 qty of product with unit price 10$ with partner A - use payment method "customer Account" i.e. of type "pay_later" (do not invoice orders) - refund 1 qty of previous order using same payment method - go to partner list, notice A has 20$ as due - click on "hamburger btn" > settle due amount Observation: - notice we only get the order amount as due i.e order with 30$ - we should have received the refund order too, so that net due of 20$ can be processed Cause: - currently, we didn't considered refunds orders at all, when settling dues Fix: - now we consider order with total < 0 i.e refund orders to be included for settlement opw-5869313 Forward-Port-Of: odoo/enterprise#113663 Forward-Port-Of: odoo/enterprise#107883
A recent update introduced an unnecessary call to external tax services, causing the checkout process to become unresponsive for users with Brazilian tax configurations (CPF). This fix removes the problematic call, streamlining the process and resolving the issue. It ensures a smoother checkout experience for customers using the Avatax module.
Original PR description
Issue: --- The extra external_tax call introduced in odoo/enterprise#101579 is causing multiple issues: 1- It doesn't catch errors while `_get_and_set_external_taxes_on_eligible_records` easily raises errors, causing uncatch errors in `website_sale`. 2- Extra unnecessary external api call in non-express checkout methods which is not desirable. Steps to reproduce: --- 1- Install l10n_br_avatax_sale, website_sale 2- Using a public user, add a product to cart and got to checkout. 3- In the address form, use CPF identification type. Outcome: The confirm button is unresponsive. Cause: --- This is due to uncatch error raised by external tax call, while it was not necessary at this step of this flow to call external tax api. opw-6005767 Forward-Port-Of: odoo/enterprise#114031 Forward-Port-Of: odoo/enterprise#112515
This update resolves an issue where delivery confirmations were failing due to missing tracking data from Easypost. The fix ensures that picking is correctly validated and the carrier tracking URL is empty, preventing shipping creation in Easypost while maintaining accurate order status in Odoo. Easypost support suggested a slight delay between order placement and tracking retrieval as a potential workaround.
Original PR description
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs…
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs with error: TypeError: 'NoneType' object is not subscriptable. As a result the picking is not validated in odoo but a shipping has succesfully been created in the easypost backend. Solution: Prevent traceback form happening, picking gets correctly validated and carrier_tracking_url field is empty. Transcript from Easypost support: << I'm also seeing the tracker showing as null when reviewing the response. I'll go ahead and create a ticket for the engineering team to investigate. I can see that the tracking code is being returned in the request, but the full tracking object is not. Since this appears to be happening on a case-by-case basis, you may want to allow more time between the BUY and the GET requests, as I noticed they are being triggered very close together. I'm not certain if that's related, but it may be worth trying as a troubleshooting step while we have this under review. >> opw-5402415 Forward-Port-Of: odoo/enterprise#111833
This update enables quick checkout by default for event and appointment bookings, streamlining the purchase process. Previously, a broad change risked disrupting other checkout flows. A system parameter allows businesses to retain full billing address details if needed, ensuring flexibility.
Original PR description
Forward-Port-Of: odoo/enterprise#113885 Forward-Port-Of: odoo/enterprise#113575
2 changes
Resolved issues and error corrections
This update fixes an issue where rental price calculations were inconsistent due to how relativedelta handled time-zoned dates. The change ensures accurate price calculations across different time zones, specifically addressing discrepancies in rental durations. This improves the reliability of rental pricing for all users.
Original PR description
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work…
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work on time-zoned dates. Example: Consider a website in UTC+1 (Brussels timezone DST off). And a rental from the 01/12/2025 to the 31/12/2025 = by design, from the 01/01/2025 00h00 (start_date) to the 31/12/2025 23h59 (end_date). Converted in UTC for the back-end, we have: from the 30/11/2025 23h00 to the 31/12/2025 22h59. relativedelta(end_date, start_date) = time between the 2 dates is calculated as follow: 30/11/2025 23h00 + 1 month = 30/12/2025 23h00 +23h59 = 31/12/2025 22h59. Time difference = 1 month, 23 hours, 59 minutes. Price = 2 months. Consider a second rental from the 01/01/2026 to the 31/01/2026. 31/12/2025 23h00 + 30 days = 30/01/2026 23h + 23h59 = 31/01/2026 22h59. Time difference = 30 days, 23 hours, 59 minutes. Price = 1 month. opw-5130762 Forward-Port-Of: odoo/enterprise#102109 Forward-Port-Of: odoo/enterprise#98571
This update resolves an error that occurred when processing DTE XML files from Chile. Specifically, the system was incorrectly setting a default journal, leading to a 'journal_id' error during account move calculations. This fix ensures proper DTE XML processing and prevents data discrepancies.
Original PR description
Currently, when receiving a DTE XML fetched by the fetchmail server, if there is no purchase journal with `l10n_latam_use_documents` enabled, an empty recordset (account.journal()) is set in the default context values. This prevents the proper computation of the field and raises an error, since the `journal_id` is mandatory on account moves. Steps to reproduce: - Ensure you have no purchase journal with `l10n_latam_use_documents` enabled - Simulate the reception of a DTE XML via the fetchmail server - Observe the error: "NotNullViolation: null value in column 'journal_id'" opw-5950116 opw-6111041
10 changes
Enhancements to existing features
This update replaces the unreliable VIES check with a more robust system using the IAP server. This improves the accuracy of EU VAT ID validation, particularly for French partners, and reduces potential errors during Tax ID changes.
Original PR description
Currently, when changing the Tax ID of a partner that is another EU country, we perform a VIES check to know whether it is valid (i.e. can do intra-com). However, it is often the case that the VIES check fails because of an internal error on their side (timeout, max concurrent update, ...), especially for France. Instead, we will now use the IAP server which stores the validity of a Tax ID for some time. If the IAP server does not have the info (because VIES is down), we will not actively wait. Instead, IAP will perform a push to a webhook on the client database once it has the information. For security purposes, an HMAC is generated and sent to IAP so that only IAP can contact the db with the up-to-date info, and not anyone on the internet that calls this new webhook. There is also a cron for polling for OnPrem instances that cannot be contacted via the webhook. task-5977584 Forward-Port-Of: odoo/odoo#259565 Forward-Port-Of: odoo/odoo#258155
Resolved issues and error corrections
This update fixes an issue where Mercado Pago webhooks with invoice references containing slashes (like INV/2026/00001) were not being correctly processed, resulting in a 404 error. The change allows the webhook to handle these references, ensuring accurate processing of Mercado Pago payments. This improves the reliability of payment processing.
Original PR description
Currently, the mercado_pago_webhook http route only takes into consideration 1 url segment. This means that invoices with references like INV/2026/00001 don't match any defined route and the server returns a 404. /payment/mercado_pago/webhook/S00001 => OK /payment/mercado_pago/webhook/INV/2026/00001 => KO This commit allows references with slashes to be matched by the route by capturing the entire remaining url path including the slashes. /payment/mercado_pago/webhook/S00001 => OK /payment/mercado_pago/webhook/INV/2026/00001 => OK opw-6035161 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259378
This update resolves an issue where the Point of Sale app on iOS/Safari would unexpectedly crash due to a lost connection to its local database. The fix prevents crashes when the app goes to the background or when the operating system temporarily closes the database connection. This ensures a more reliable and stable Point of Sale experience for our iOS users.
Original PR description
On iOS/Safari, the WebKit IDB server process can be killed by the OS (e.g. due to memory pressure when the app is backgrounded), resulting in an UnknownError: "Connection to Indexed Database server lost". Additionally, returning from background can leave the connection in an InvalidStateError "closing" state while this.db remains non-null. opw-5121896 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256401 Forward-Port-Of: odoo/odoo#253943
This update corrects a rounding issue in the Peppol invoice XML generation, preventing validation errors related to line amount calculations. The fix ensures accurate invoice formatting for Peppol compliance, avoiding potential delays in electronic invoice processing. This improves the reliability of our Peppol integration.
Original PR description
**PROBLEM** Previously, we rounded the unit price up to 6 digits in the generated xml for peppol. However, odoo compute the lineExtensionAmount with the raw unit price. The generated xml is invalid because `priceAmount*InvoicedQuantity != LineExtensionAmount`. **STEP TO REPRODUCE** 1. Create an invoice with unit price of 0.01110515964, and quantity of 278362.5. 2. Generate an XML with peppol, and try validating the invoice. You should have the following error: `[PEPPOL-EN16931-R120]-Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount` opw-6009771 Forward-Port-Of: odoo/odoo#255358
This update resolves an issue where invoices weren't automatically marked as paid when using a specific payment setup (default bank account as outstanding account). This prevented invoices from correctly reflecting completed subscription payments. The fix ensures invoices are properly reconciled, streamlining the billing process.
Original PR description
Currently, when a subscription payment is processed through a provider configured to use as outstanding account the bank default account, the resulting invoice may remain in an 'open' state even…
Currently, when a subscription payment is processed through a provider configured to use as outstanding account the bank default account, the resulting invoice may remain in an 'open' state even though the payment transaction is 'done'. This type of configuration is usually done when users want to skip the bank reconciliation process, and just create payments without the need to reconcile the payments with transactions. Steps to reproduce: - In Settings, under Sales > Invoicing, disable Automatic Invoice - Activate demo payment method - In the main Bank account add the default account as outstanding account for demo payment method. - Create a sales order with a subscription product - Open Preview - Pay - Go back to the sales order and open the created invoice Issue: The invoice is created and the payment is registered, but the invoice remains 'Not Paid'. Analysis: The invoice and the payment move lines are not automatically reconciled during the post-processing of the transaction, leaving the invoice unbalanced. opw-5869303
This update fixes a limitation in Odoo Studio where activity filters (past, today, future) weren't consistently working when the 'use_mail' Chatter feature was enabled. The team added necessary filters to the search view, ensuring users can effectively filter activities based on their timeliness within Studio. This enhances Studio's usability for managing and tracking activities related to records.
Original PR description
Steps to reproduce
==================
- Install studio
- Create a new app
- Create a new model
- Keep the Chatter toggled (use_mail)
- Exit studio
- Create three records, one with an activity in the past, one today and one in the future
- Click on the clock status icon in the top right
- There should be a section with the new model
- Click on 1 Late => every records is displayed
- Same for Today and Future
Cause of the issue
==================
https://github.com/odoo/odoo/blob/b6434b91a7f94075e1372ec827787504ef7aa4f0/addons/mail/static/src/core/web/activity_menu.js#L39-L77
For this feature to work, the activities_{overdue,today,upcoming_all} filter should be present
Solution
========
We add them to the search view. They are all pretty much implemented the same way in every model.
opw-6069150
Forward-Port-Of: odoo/enterprise#113011This update corrects a discrepancy in how purchase order move lines handle sub-location destinations. Previously, even with a sub-location configured, move lines defaulted to the main warehouse, preventing accurate forecasted quantity updates. This change prioritizes the sub-location, ensuring that quantities are correctly tracked for specific receiving areas.
Original PR description
### **Description of the issue/feature this PR addresses:** **Issue:** In Odoo 18/19, purchase move lines default to the WH's main stock location (`lot_stock_id`) as the `location_final_id`. However,…
### **Description of the issue/feature this PR addresses:** **Issue:** In Odoo 18/19, purchase move lines default to the WH's main stock location (`lot_stock_id`) as the `location_final_id`. However, when a user configures a sub-location on the Receipt Operation Type, the picking destination is correct, but the move lines are defaulted to the main warehouse. This mismatch causes the Forecasted Quantity to not increment for the intended sub-location **Solution:** Prioritize the `default_location_dest_id` before falling back to the default stock location opw-6032018 ### **Current behavior before PR:** When confirming a PO, the `location_final_id` on stock moves defaults to the `lot_stock_id`, regardless of the specific destination set on the Operation Type. This causes a mismatch in 1-step receiving flows where a sub-location (e.g., WH/Stock/Test) is intended, since the move lines revert to the root warehouse location (WH/Stock). Thus, the forecasted quantity for the specific sub-location doesn't increment as expected. ### **Desired behavior after PR is merged:** The `_get_final_location_record` method will now evaluate if the Operation Type's `default_location_dest_id` is a child of the warehouse's main stock. If it is, the sub-location is used as the `location_final_id` for the moves and move lines. This ensures that the forecasted quantity reflects the intended destination upon PO confirmation while still maintaining the fallback to the warehouse root for standard multi-step routes. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256725 Forward-Port-Of: odoo/odoo#254527
This update fixes an issue where the Italian tax module was incorrectly removing parts of VAT numbers when generating invoices for Spain. The fix ensures that VAT numbers, like A95758389, are accurately exported to the tax agency's XML files, preventing data discrepancies. This ensures compliance with Italian tax regulations.
Original PR description
**Steps to reproduce:** * Install `l10n_it_edi` module. * Create a partner with country **Spain** and VAT `A95758389`. * Create an invoice and send it to the Tax Agency, and download XML. **Observed behavior:** * The exported XML contains `5758389` in <IdCodice> instead of `A95758389` — the first two characters of the VAT are silently dropped. **Cause:** * In `_l10n_it_edi_get_values`, the EU branch that strips the country-code prefix used a bare `else` after the `isdecimal()` check, unconditionally removing the first two characters of any VAT that does not start with two digits. Spanish NIFs like `A95758389` start with `A9` (letter + digit), which is not a country-code prefix but was treated as one, corrupting the value. **Fix:** * Remove country prefix from normalized VAT by `removeprefix(normalized_country)` Instead of removing the first two characters. It will ensure that only the country prefix will be removed. opw-6089198 Forward-Port-Of: odoo/odoo#258626
This update resolves issues causing crashes when deleting sign templates and breaks in the tracking of document signatures. The fix ensures documents remain stable during template creation and deletion, and accurately maintains the link between signature requests and their original documents, regardless of the number of templates created.
Original PR description
Steps to reproduce: Bug 1 (The Crash): 1. Open Documents app, select a PDF, and click Action > Sign. 2. In the Sign app, delete the newly created Sign Template. 3. Return to the Documents app. 4. A…
Steps to reproduce:
Bug 1 (The Crash):
1. Open Documents app, select a PDF, and click Action > Sign.
2. In the Sign app, delete the newly created Sign Template.
3. Return to the Documents app.
4. A traceback occurs (`KeyError: <document_id>`) in `web_read`.
Bug 2 (The Broken Lineage):
1. Create two separate Sign Templates from the exact same Document.
2. Send a signature request from the second template.
3. The `reference_doc` on the signature request fails to link back to the original Document.
Current behavior:
When creating a sign template from a document, `documents_sign` intentionally unlinks the original `ir.attachment` (`res_model = False`) to pass custody to `sign.document`. If the template is deleted, the attachment is orphaned, permanently corrupting the original `documents.document` and crashing the UI.
Furthermore, the lineage tracking (`reference_doc`) relies strictly on a 1:1 shared `attachment_id`. If a user creates multiple templates from one document, the system is forced to make a copy for the second template, natively breaking the lineage tracking because the IDs no longer match.
Expected behavior:
Documents should not be corrupted when generating or deleting sign templates. Furthermore, lineage tracking (`reference_doc`) should successfully link back to the original document regardless of how many templates have been generated from it.
Fix:
1. Replaced the `res_model = False` custody-handoff hack in `documents_sign` with a safe `.copy({'original_id': attachment.id})`. This sandboxes the Sign app's files, completely preventing the deletion crash and the multi-template conflicts.
2. Updated the `reference_doc` computation in `sign.request` to dynamically search for both the current `attachment_id` AND its `original_id` (utilizing a minimal-diff recordset union `|`). This perfectly preserves the lineage tracking for all templates without requiring database schema changes.
Task: 5432116This update fixes an error in the manufacturing report that incorrectly converted quantities between different units of measure (e.g., Kg and Ton). The fix ensures accurate calculations for produced quantities and average unit costs, resolving discrepancies in reporting. This improves the reliability of production cost analysis.
Original PR description
Steps to reproduce:
- Create a product W1 with UoM = Kg with the following BoM:
- Component C1: 1 unit, cost = $1
- Create and confirm MO1:
- Produce 1 Kg of W1 → total cost = $1
- Create and confirm MO2:
- Produce 1 Ton of W1 → total cost = $1000
- Open the Manufacturing Report and group results
Problem:
- qty_produced ≈ 1.001 instead of 1001
- unit_cost average ≈ 1000 instead of 1
Expected behavior:
- qty_produced = 1001
- unit_cost average = 1 (consistent across MOs)
The manufacturing report (`mrp.report`) incorrectly converts quantities from move UoM to product UoM, leading to wrong `qty_produced` and `qty_demanded` values when different units of measure are used
The current implementation uses:
sm.quantity / uom.factor * uom_prod.factor
This inverts the conversion ratio. As a result:
- 1 Ton is converted to 0.001 Kg instead of 1000 Kg
opw-60970982 changes
Resolved issues and error corrections
This update resolves an issue where ISO20022 payments using JPY were failing due to a hardcoded decimal format in the payment file. The fix dynamically adjusts the decimal places based on the currency, ensuring compatibility with banks and accurate payment processing. This prevents payment rejections and improves JPY payment functionality.
Original PR description
Steps to reproduce: ------------------- 1. Activate JPY and create a JPY bank journal with ISO20022 as an outgoing payment method 2. Create a vendor (with a country) and add a trusted bank account 3.…
Steps to reproduce: ------------------- 1. Activate JPY and create a JPY bank journal with ISO20022 as an outgoing payment method 2. Create a vendor (with a country) and add a trusted bank account 3. Create and confirm a vendor bill in JPY (e.g. ¥1000), and pay it using the ISO20022 method on the JPY journal 4. Create a batch payment containing that payment, with Batch Type Outbound, on the JPY journal, with ISO20022 as payment method 5. Validate the batch — the XML file is generated and attached 6. Download it -> The `<InstdAmt Ccy="JPY">` node outputs `1000.00`, while JPY has no decimals. The file is rejected by banks. The fix: -------- Backport of 8da91d94ed1e8fad0e827f96172e3785e9f0e28d: > Generating the xml file for iso20022 always generates the amount with two decimals which is hard coded and can cause error for currencies without decimals for example JPY. > The fix is to have the currency decimal number dynamically set through the currency decimal places field. opw-6103849 Forward-Port-Of: odoo/enterprise#113296
This update ensures that when scanning a GS1 barcode on a packaging unit, the system correctly incorporates the packaging's expiration date when creating a new lot. Previously, the system overlooked this information, leading to inaccurate expiry tracking for packaged goods. This improvement enhances inventory management and compliance.
Original PR description
Issue
-----
Scanning a GS1 barcode containing:
- packaging
- lot
- due date
disregards the due date when creating the new lot.
Steps to reproduce
-----
- Enable GS1 nomenclature & packagings
- Create a product
- barcode 23456789012344
- packaging with barcode 01234567890128
- some on hand quantity
- Create a delivery for a full packaging of the product
- Open the delivery in barcode
- Scan 02 01234567890128 15 270101 10 LOT1
- Validate
- Open the lot
> Expiration date is set to today
Cause
-----
The code expects the product be scanned, there is no logic to retrieve it from the packaging when missing.
-----
Ticket:
opw-6073489
Forward-Port-Of: odoo/enterprise#11249012 changes
New functionality added to Odoo
This update adds a guided tour to help users correctly set up and use Worldline payment terminals when operating kiosks. This ensures seamless payment processing and improves the overall kiosk ordering experience. It addresses a previous issue related to Worldline terminal compatibility.
Original PR description
We add a tour to ensure worldline payment terminals work correctly with kiosk. Forward-Port-Of: odoo/enterprise#113823 Forward-Port-Of: odoo/enterprise#105478
This update introduces a new feature to manage and track employee transportation allowances. Specifically, it supports reimbursement for employees covered under the 200 and 302 joint committees, streamlining payroll processing for these groups. This enhancement improves the accuracy and efficiency of compensation calculations related to transportation costs.
Enhancements to existing features
This update enhances the mobile map view by switching to a bottom sheet for displaying pin lists. This eliminates the awkward split-screen effect and provides a much smoother, more intuitive user experience when navigating the map on smaller devices. It's a simple change that significantly improves usability.
Original PR description
Improves the mobile map view design by replacing the split-screen pin list with a bottom sheet overlay. This prevents the map from being abruptly cut in half when the list is toggled, resulting in a much smoother UX. task-6059726
This update streamlines the handling of depreciation models within Odoo, making them more flexible and reliable. Specifically, it removes the requirement for company IDs and resolves conflicts between company and all-company models, ensuring assets are created correctly across all businesses. This improves asset tracking and reporting.
Original PR description
This commit applies several changes to fixed assets and depreciation model: 1. Depreciation model is no longer required to have a company id and the default is set to null. If a depreciation model has an empty company id, it means the depreciation model exists for all companies. 2. If a depreciation model with no company id is used to create an asset, the first general journal for the current company is used to create an asset. 3. In chart template, when loading depreciation models, we first check if it exists as an all-company model. If it exists, then we skip the model creation and update record xmlid to reference all-company model. 4. If company depreciation model conflicts with all-company depreciation model, then journal name is appended to the company depreciation model name. 5. The `car_category` field is removed from the `account.fiscal.category` model. A similar field `is_vehicle_account` already exists in `account.account`. task-6010586
This update simplifies the rental app experience in One-App Free by making key rental options readily accessible and updating demo data to reflect the latest system logic. This ensures accurate testing and a more intuitive user experience for rental configurations.
Original PR description
This pull request introduces key usability improvements for the rental app in One-App Free environments and refreshes the associated demo data across all related modules. Previously, essential rental…
This pull request introduces key usability improvements for the rental app in One-App Free environments and refreshes the associated demo data across all related modules. Previously, essential rental options were hidden from standard menus, requiring technical workarounds to enable basic capabilities. To resolve this, rental menus and settings have been reorganized to expose these core features directly in the base app. Additionally, the pickup and return time fields have been migrated from `website_sale_renting` to the core `sale_renting` module, and the default rental date computation logic has been unified so both backend and frontend flows share the exact same logic. Furthermore, following recent architectural changes in the rental app (#104380), the existing demo data had become outdated and lacked diversity, as most products were limited strictly to daily rentals. This PR comprehensively updates the demo data to align with the new system logic, providing a much wider range of configuration scenarios to ensure robust and accurate testing going forward. task-5865007 This PR also includes https://github.com/odoo/enterprise/pull/109498 (task-6003684) to resolve conflicts and speedup the merge 🚀 See also: - https://github.com/odoo/upgrade/pull/9897
This update automates the generation of French tax reports by extracting key data and formatting it into a structured XML file. This XML will then be sent to Aspone, streamlining the process of submitting the 'liaisse fiscale' – a crucial French tax return – directly from Odoo. This improves efficiency and reduces manual data entry errors.
Original PR description
This task aims to extract the values of the reports and send them as a structured xml to Aspone task_id-5913160
This update streamlines the process of creating documents from attachments. Users can now automatically create a document in their personal folder with a single click, eliminating the need for a separate selection step. The action button visually indicates if the attachment has already been processed, improving efficiency.
Original PR description
The attachment's "Add to Document" action allows to create a Document from a mail_thread record's attachment. To streamline the user experience, documents are now created in one click: * In the documents bridge folder for the record, if applicable * In My Drive otherwise Clicking the action button again allows to move the document or create a personal copy if the former is not allowed. The action button will also be displayed with a color and a specific icon indicating that the attachment has already been treated. Task-5882406
This update streamlines the payment process, allowing users to pay directly from invoices or payments instead of relying solely on batch payments. This change improves user convenience and encourages more users to connect their bank accounts within Odoo, boosting payment efficiency.
Original PR description
This commit improve the payment initiation flow. The idea is to minimize de steps required to achieve a payment. Before -> everything was done from the batch payment Now -> you can pay directly from a payment or a bill We also put more visibility on the feature, to invite users to connect their bank in Odoo. Linked:https://github.com/odoo/odoo/pull/254896 Linked:https://github.com/odoo/upgrade/pull/9925 task-5977356
This update incorporates changes from a community pull request to enhance the order ticket screen. Specifically, clicking the 'info' button now provides more detailed information, streamlining the process for support staff to manage and resolve customer issues. This improves the efficiency of our support operations.
Original PR description
Adaptations related to the imps made in the community PR. Adapts the click on info button in the ticket screen. task: 6009872 community pr : https://github.com/odoo/odoo/pull/253518
This update simplifies the email marketing process by transforming the 'View Online' option into a user-friendly builder tool within the design section. This change allows users to create more visually appealing email templates directly within Odoo, enhancing the overall marketing experience.
Original PR description
This PR, related to a community PR, improves the UI/UX of the email marketing app. The change in this PR concerns the change of the `View in Browser` (previously described as `View Online`) from a snippet into a builder option under the design tab. Task-5358279
This update optimizes how the AI agent accesses topic information, preventing unnecessary data loading and potential confusion for the LLM. By introducing a 'Load Topic' tool, the agent now only retrieves the specific topics relevant to its current task, leading to faster and more efficient responses. This change improves the overall performance and reliability of the AI agent.
Original PR description
Before this commit, all topics (and their attached tools) are always in the context, even when not needed. With this commit, we add a new tool "AI: Load Topic" that the LLM must use to load the Topic information along with its tools when it needs it. This prevent the context from being loaded with unnecessary information which can confuse the LLM. This commit brings the following changes: - Addition of a new tool "Load Topic" to load the topics upon request. Only the topics that are linked to the agent can be loaded. - The context now contains a list of available topics based on the agent with some basic information (id, title, description) helping the LLM make its decision. - The `tools_context` contains information about the tools that have been enabled for the current session. - The `ai.agent` model now has a direct link to the `ai.tool` model
Resolved issues and error corrections
This update resolves a problem where certain fields within the partner commission report were not being properly filtered, leading to inaccurate sales data. The fix ensures that reports now display the correct commission calculations for sales orders. This improves the reliability of sales reporting.
Original PR description
Forward-Port-Of: odoo/enterprise#113825
17 changes
New functionality added to Odoo
This update adds the ability to generate SAT trial balance reports in a supplementary format, aligning with Mexican tax authority requirements. The changes ensure correct formatting, including specific file naming conventions and data attributes, to meet SAT specifications and facilitate accurate tax reporting. This supports compliance with Mexican tax regulations.
Original PR description
Adds support for generating SAT (Mexican tax authority) trial balance reports in supplementary (complementary) format, as required by SAT specifications. Changes: - Add default value for submit_type…
Adds support for generating SAT (Mexican tax authority) trial balance reports in supplementary (complementary) format, as required by SAT specifications. Changes: - Add default value for submit_type in SAT XML generation to fix tests that call the method directly without going through the wizard - Add new tests for normal (TipoEnvio=N) and supplementary (TipoEnvio=C) formats - Verify that FechaModBal attribute is correctly included only for supplementary reports - Verify that filenames correctly use BN (normal) or BC (complementary) suffixes The SAT technical specification requires: - TipoEnvio="C" (complementary) for supplementary balance sheets - FechaModBal attribute (date of last accounting modification) when tipo is C - File naming convention: RFC+Year+Month+BN (normal) or BC (complementary) SAT technical specification: https://wwwmat.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1461173762094&ssbinary=true Ticket: https://www.odoo.com/es_ES/my/tasks/6025590 @moduon MT-14181
Resolved issues and error corrections
This update resolves a bug that prevented bill matching from working correctly when a vendor bill line lacked a product definition. The fix ensures that quantity calculations are handled appropriately, avoiding errors and improving the reliability of the bill matching process. This change ensures accurate record keeping and prevents disruptions to the purchasing workflow.
Original PR description
Steps to reproduce: - Import or create a vendor bill with a line that has a unit of measure but no product. - Open the bill and go for the bill matching. Issue: Bill lines without a product have product_uom_id set to False. During bill matching, _compute_product_uom_qty calls _compute_quantity without checking this value, which raises a UserError due to missing or invalid UoM configuration. Solution: Add a check to ensure _compute_quantity is only called when product_uom_id is set. Otherwise, fall back to the original line quantity to avoid conversion errors. opw - 6109513
This update optimizes the workcenter planning process by streamlining how it identifies available time slots. By using a more efficient method to detect conflicting intervals, the system now finds available slots significantly faster, especially for short scheduling durations. This reduces processing time and improves overall planning efficiency.
Original PR description
### Description of the issue/feature this PR addresses: The workcenter planning logic in _get_first_available_slot can become inefficient when searching for very short available slots. The method…
### Description of the issue/feature this PR addresses: The workcenter planning logic in _get_first_available_slot can become inefficient when searching for very short available slots. The method repeatedly builds small candidate time windows and checks them against existing workorder and leave intervals, potentially iterating many times before finding a free slot. This leads to unnecessary computational overhead in scenarios where a large number of busy intervals exist and the remaining duration to schedule is small. ### Current behavior before PR: The planner checks for conflicts by computing the intersection between the candidate window and the busy intervals. When a conflict is detected, the candidate window is shifted forward (or backward) to the end (or start) of the intersection, and the process is repeated until a free slot is found. This approach requires repeatedly performing full interval merge operations, which becomes disproportionately expensive when the candidate windows are very small and the loop iterates many times. ### Desired behavior after PR is merged: The planner uses a new Intervals.conflicting() helper to retrieve the entire busy interval that overlaps with the candidate window. Instead of advancing only to the end of the intersection slice, the planner can jump directly to the end (or start) of the full busy interval. This avoids repeated full-merge work, reduces the number of iterations needed to find a valid slot, and prevents pathological performance slowdowns in short-duration planning scenarios. ### Benchmarks Profiling _get_first_available_slot with different workorder durations. Database has multiple months that are fully booked. Speedup is more dramatic with shorter durations but there is at minimum minor improvements across the board. | Work Order Duration | Before | After | | --- |---|---| | 1sec | ~2.5min | <1sec | | 1min | ~2sec | <1sec | ### References opw-5437256 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a rounding issue in the generation of Peppol invoices, ensuring accurate calculations for line amounts. Previously, the system rounded unit prices, leading to validation errors. This fix ensures invoices comply with Peppol standards and avoids potential shipping delays or payment issues.
Original PR description
**PROBLEM** Previously, we rounded the unit price up to 6 digits in the generated xml for peppol. However, odoo compute the lineExtensionAmount with the raw unit price. The generated xml is invalid because `priceAmount*InvoicedQuantity != LineExtensionAmount`. **STEP TO REPRODUCE** 1. Create an invoice with unit price of 0.01110515964, and quantity of 278362.5. 2. Generate an XML with peppol, and try validating the invoice. You should have the following error: `[PEPPOL-EN16931-R120]-Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount` opw-6009771
This update fixes a security issue where unauthorized users could access asset information linked to invoices. Now, only users in specific accounting groups (read-only or invoice-related) can view assets, preventing potential data access problems. This ensures data integrity and protects sensitive financial information.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#113523 Forward-Port-Of: odoo/enterprise#112890
This update fixes a calculation error in the timesheet grid's monthly view for flexible schedules. Previously, it incorrectly displayed a deficit, even with fully completed workdays. The fix ensures accurate required hour calculations by adjusting the formula to account for standard working days.
Original PR description
When using a flexible working schedule, the month view for timesheets shows a deficit even when all working days are fully completed. ### **Steps to reproduce:** 1) Install Timesheet Grid. 2) Assign…
When using a flexible working schedule, the month view for timesheets shows a deficit even when all working days are fully completed. ### **Steps to reproduce:** 1) Install Timesheet Grid. 2) Assign a flexible working schedule (40 hrs/week, 8 hrs/day) to an admin. 3) Enter timesheets with 8 hours per weekday for a full month (except Feb). 4) Open the timesheets grid month view. Note: current formula correctly calculates for feb month **((40/7)** * **28) = 160** ### **Observed behavior:** The weekly view shows correct totals, but the monthly view displays a deficit (176 h with -1:08 h), despite all working days being fully completed. <img width="1920" height="366" alt="image" src="https://github.com/user-attachments/assets/df98c3e0-ee89-455d-86c6-7941ba0cb7a8" /> ### **Expected behavior:** The monthly view should correctly calculate the required hours i.e 176 h <img width="1909" height="357" alt="image" src="https://github.com/user-attachments/assets/c082953a-62ad-4096-8774-76d9ff7b3b25" /> ### **Root Cause:** The method [_count_daily_working_hours](https://github.com/odoo/enterprise/blob/3cf76350794078f807fc07cd0b42d0bb0315ccab/timesheet_grid/models/hr_employee.py#L82) calculated `full_time_required_hours` for a period by dividing the weekly required hours by 7 (including weekends) and multiplying by the total calendar days in the period at [1]. This gave incorrect required hours for months that have extra weekend days. [1]- https://github.com/odoo/enterprise/blob/3cf76350794078f807fc07cd0b42d0bb0315ccab/timesheet_grid/models/hr_employee.py#L115 ### **Fix:** Update the computation to divide the weekly `full_time_required_hours` by `5` (standard working days) and multiply by the actual number of weekdays in the requested period. **Example calculation for the month March 2026:** | | Formula | Values | Calculation | Result | |--------|--------|--------|--------|--------| | Before Fix | round(full_time_required_hours / 7 * (delta.days + 1), 2) | full_time_required_hours = 40, delta.days + 1 = 31 | round(40 / 7 * 31, 2) | **177.14 h** | | After Fix | round((full_time_required_hours / 5) * working_days_in_period, 2) | full_time_required_hours = 40, working_days_in_period = 22 | round((40 / 5) * 22, 2) | **176.00 h** | **opw-5966769**
This update fixes an issue where bank statement creation didn't consistently use the specified journal type. Now, when a journal type is set during bank statement creation, the system correctly assigns the appropriate journal, ensuring accurate financial record-keeping. This improves the reliability of bank statement processing.
Original PR description
When a account.bank.statement is created via a action where the journal_type is set in the context this value isn't used to compute the right journal for the account.bank.statement.line/account.move --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where invoices could fail to process correctly with the Peppol system. The fix involved a temporary workaround to prevent a specific error during invoice generation, ensuring invoices can now be properly tracked and status updates retrieved. This improves the reliability of Peppol invoice processing.
Original PR description
1. Send an invoice that will return an error when send to IAP 2. Send the invoice 3. Click "Fetch Peppol Invoice status" on the dashboard 4. There is a traceback (see the bottom of this message) To…
1. Send an invoice that will return an error when send to IAP
2. Send the invoice
3. Click "Fetch Peppol Invoice status" on the dashboard
4. There is a traceback (see the bottom of this message)
To create an invoice that will return an error I locally removed the EndpointID from the UBL generation (and the constraint to check that during the genreation).
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 2167, in _transactioning
return service_model.retrying(func, env=self.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/service/model.py", line 157, in retrying
result = func()
^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 2134, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 2382, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/http.py", line 754, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 42, in call_button
action = call_kw(request.env[model], method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/api.py", line 535, in call_kw
result = getattr(recs, name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/account_peppol/models/account_journal.py", line 34, in peppol_get_message_status
edi_users._peppol_get_message_status()
File "/home/odoo/src/odoo/addons/account_peppol/models/account_edi_proxy_user.py", line 287, in _peppol_get_message_status
processed_message_uuids = edi_user._peppol_process_messages_status(messages_to_process, uuid_to_record)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/account_peppol_response/models/account_edi_proxy_user.py", line 180, in _peppol_process_messages_status
peppol_response = uuid_to_record[uuid]
^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'document_type'
```
task-NoneThis update allows administrators to control whether subscription users are automatically reset. Previously, this process was fixed, making it difficult to manage. By providing greater control, this change improves flexibility and operational efficiency for subscription-based sales.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable.
This update resolves an issue where backorder returns weren't properly associated with the original delivery. The fix ensures that when a backorder is returned, it's correctly linked to the associated delivery, improving the accuracy of inventory tracking. This prevents discrepancies and simplifies the return process.
Original PR description
### Steps to reproduce: - Create, confirm and validate a delivery for 2 units of a product A - Click Return > Return All - Validate the return for 1 unit and backorder #### > The backorder does not belong to the return list of the delivery ### Cause of the issue: Backorder pickings are created by copying the picking to backorder: https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L1580-L1593 https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L1571-L1578 However, the `return_id` is a `copy=False` field that is not manully set during this copy process: https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L558 opw-6111544 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the Italian tax reporting module was incorrectly removing parts of VAT numbers when generating XML invoices. The fix ensures that VAT numbers, like those used in Spain, are accurately exported to the tax agency, preventing reporting errors. This improves data accuracy and compliance.
Original PR description
**Steps to reproduce:** * Install `l10n_it_edi` module. * Create a partner with country **Spain** and VAT `A95758389`. * Create an invoice and send it to the Tax Agency, and download XML. **Observed behavior:** * The exported XML contains `5758389` in <IdCodice> instead of `A95758389` — the first two characters of the VAT are silently dropped. **Cause:** * In `_l10n_it_edi_get_values`, the EU branch that strips the country-code prefix used a bare `else` after the `isdecimal()` check, unconditionally removing the first two characters of any VAT that does not start with two digits. Spanish NIFs like `A95758389` start with `A9` (letter + digit), which is not a country-code prefix but was treated as one, corrupting the value. **Fix:** * Remove country prefix from normalized VAT by `removeprefix(normalized_country)` Instead of removing the first two characters. It will ensure that only the country prefix will be removed. opw-6089198 Forward-Port-Of: odoo/odoo#258626
This update resolves an issue where users without the necessary permissions could still access the Documents app. The fix restricts access to the Documents app icon and dashboard to only administrator users, ensuring data security and proper user access control. This prevents unauthorized access to sensitive documents.
Original PR description
Steps to reproduce: =================== - Login as admin and create another user. - Download 'Documents' app. - Revoke user of 'Documents' app access . - Login as the other user. - The 'Documents' app is showing even-though the user shouldn't have access to it. Cause of Issue: ====== - 'Documents' icon and dashboard have 'base.group_user' access. https://github.com/odoo/enterprise/blob/3e8c4e90b07bd7ddc034c9c6df114a66753e2ef3/documents/views/documents_menu_views.xml#L4-L12 opw-5914433
This update resolves an issue where the custom declaration field wasn't automatically filled for international World Express Pro shipments through the BPost module. Now, the necessary information is correctly populated, ensuring accurate customs documentation and smoother international deliveries. This improves compliance and reduces potential delays.
Original PR description
Before this commit, the bpost module was not filling the custom declaration in case of international shipping (World Express Pro) After this commit, the section is filled opw-4932970
This update enhances the accuracy of tax calculations for Odoo's Argentina localization (l10n_ar). By modernizing the tax calculation methods, the system now aligns with best practices and prepares for potential future adjustments to Argentine tax regulations. This ensures more reliable financial reporting for users in Argentina.
Original PR description
This commit refactors the tax amount calculations on the `_get_vat` and `_l10n_ar_get_amounts` method so that it uses the tax computation engine helpers properly, to prepare for any future fixes done on how Argentina tax calculations differs from all other localizations. This replaces all move line queries with the proper `base_line` calculation, with the proper aggregating methods. related-enterprise-PR: https://github.com/odoo/enterprise/pull/92639 task-4891206
This update fixes inaccuracies in how tax amounts are calculated within the l10n_ar_edi module. By utilizing the Odoo's tax computation engine, the changes ensure more precise and reliable tax calculations across various sales and invoice scenarios. This improves financial reporting accuracy.
Original PR description
- Rewrite all tax amounts calculations on `_get_tributes` and `_get_line_details` to properly use the tax computation engine helpers (`base_line`, and aggregating methods) - Ensure that all final amounts from the calculation are formatted with `float_repr` with appropriate precision. related-community-PR: https://github.com/odoo/odoo/pull/223393 task-4891206
This update ensures that subcontracted items always display a cost in the BOM report, even when an exact supplier match isn't found. Previously, the cost would be hidden if no supplier met the quantity requirements. This change guarantees a complete and accurate BOM cost structure, improving reporting and decision-making.
Original PR description
Description of the issue/feature this PR addresses: When visualizing the structure of a BOM with subcontracted components, the subcontracting cost is omitted if no supplierinfo record exists with a…
Description of the issue/feature this PR addresses: When visualizing the structure of a BOM with subcontracted components, the subcontracting cost is omitted if no supplierinfo record exists with a `min_qty` less than or equal to the requested quantity. This leads to an inconsistent experience compared to regular components, which still show a price by selecting the closest lower `min_qty`. For subcontracted components, if the requested quantity does not match any valid `supplierinfo`, the cost line silently disappears from the report. Current behavior before PR: The subcontracting cost is not shown in the BOM cost structure if no `supplierinfo` matches the requested quantity (i.e., `min_qty > quantity`). Desired behavior after PR is merged: If no matching supplier is found for the requested quantity, the fallback logic uses any available supplierinfo (as already done in `_format_route_info`), ensuring a price is shown for subcontracted lines. This guarantees the BOM cost structure always includes the subcontracting cost, making the report complete and coherent. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a problem where canceling a transaction on a point-of-sale terminal (without initiating the cancellation process within the POS system) would cause errors. The change ensures the system correctly handles cancellation requests, regardless of where they originate, improving transaction reliability. This prevents data inconsistencies and potential disruptions to sales.
Original PR description
Currently if you cancel a transaction on the terminal (not in pos) this lead to a traceback TypeError: this.cancel_resolve is not a function at Proxy._waitingPayment (https://varoconsult-be-itve.odoo.com/web/assets/4473ba8/point_of_sale.assets_prod.min.js:16764:298) at Proxy._onValueChange (https://varoconsult-be-itve.odoo.com/web/assets/4473ba8/point_of_sale.assets_prod.min.js:16758:184) at Proxy._onSuccess (https://varoconsult-be-itve.odoo.com/web/assets/4473ba8/point_of_sale.assets_prod.min.js:16674:190) at Proxy._onSuccess (https://varoconsult-be-itve.odoo.com/web/assets/4473ba8/point_of_sale.assets_prod.min.js:16778:1228) at https://varoconsult-be-itve.odoo.com/web/assets/4473ba8/point_of_sale.assets_prod.min.js:16672:417 This PR fixes the issue to ensure the scenario when the pos didnt ask for cancellation is managed
5 changes
Resolved issues and error corrections
This update fixes an error in how stock valuations are calculated when receiving foreign currency purchases with auto-standard products. Previously, incorrect currency exchange entries were created, leading to inaccurate inventory values. This change ensures that stock valuations accurately reflect the cost of goods, regardless of currency.
Original PR description
This is a backport of https://github.com/odoo/odoo/pull/243029 The same bug is reproducible in 17.0 Processing a buy-receive-bill process in a foreign currency and with an auto-standard product will…
This is a backport of https://github.com/odoo/odoo/pull/243029 The same bug is reproducible in 17.0 Processing a buy-receive-bill process in a foreign currency and with an auto-standard product will lead to an incorrect valuation To reproduce the issue: (Company in USD) 1. Enable EUR and define the rates as followed: - Yesterday: 2 - Today: 2.5 2. Create a product category: - Method: Standard - Valuation: Automated 3. Create a product P in that category - Cost: 10 USD 4. [Yesterday] Confirm a PO in EUR with 1 x P 5. [Yesterday] Receive it 6. Bill Error: the stock valuation has two entries: one with 10 USD debit, the receipt. Another one with 2 USD credit, the currency exchange rate difference. The second one is a mistake, in a standard configuration, the stock valuation should be impacted by nothing but the cost defined on the product form. Since https://github.com/odoo-dev/odoo/commit/bae7feefcb08db7329d52bc36517dfd73f3347a7, in some conditions the method `_get_exchange_account` returns the stock valuation account. This is what happens here, but it's a mistake since in the above case, we should stick with the classic account (i.e. the `super` call). The conditions must be more strict. opw-5905197
This update fixes an issue where the Italian tax module was incorrectly removing parts of VAT numbers when generating XML invoices for Spanish partners. The fix ensures that VAT numbers, like 'A95758389', are accurately exported to the tax agency, preventing data discrepancies and potential compliance problems. This improves the reliability of invoice data transmission.
Original PR description
**Steps to reproduce:** * Install `l10n_it_edi` module. * Create a partner with country **Spain** and VAT `A95758389`. * Create an invoice and send it to the Tax Agency, and download XML. **Observed behavior:** * The exported XML contains `5758389` in <IdCodice> instead of `A95758389` — the first two characters of the VAT are silently dropped. **Cause:** * In `_l10n_it_edi_get_values`, the EU branch that strips the country-code prefix used a bare `else` after the `isdecimal()` check, unconditionally removing the first two characters of any VAT that does not start with two digits. Spanish NIFs like `A95758389` start with `A9` (letter + digit), which is not a country-code prefix but was treated as one, corrupting the value. **Fix:** * Remove country prefix from normalized VAT by `removeprefix(normalized_country)` Instead of removing the first two characters. It will ensure that only the country prefix will be removed. opw-6089198
This update corrects a problem where invoice exports to FAIA were failing due to inconsistencies in how account IDs were referenced. The change ensures that all account IDs in the export match those defined within Odoo's accounting system, improving the reliability of financial reports. This resolves an issue impacting accurate reporting.
Original PR description
This is one of several commits fixing the FAIA xml export. The Invoice/Line/AccountID element in SourceDocuments/SalesInvoices and SourceDocuments/PurchaseInvoices must match an account defined in MasterFiles/GeneralLedgerAccounts/Account/AccountID. As the latter uses account_code since PR #65221, the former should too. opw-5427296 [Link](https://www.odoo.com/odoo/unassigned-tasks/5427296)
This update resolves an issue where entering an invalid Taiwan VAT number (e.g., containing letters) would cause the invoicing system to crash. The fix adds validation to ensure the VAT number consists only of digits, providing a clear warning message to the user instead of an error.
Original PR description
**Steps to reproduce:** - Install the `base_vat` module. - Navigate to Invoicing > Customers. - Create a new contact and set the country to `Taiwan`. - Enter `1234567A` as the `Tax ID` and try to `save`. **Error:** `ValueError: invalid literal for int() with base 10: 'A'` **Root cause:** At [1], `check_vat_tw` is missing validation to ensure that the VAT number (without the country code) contains only digits, which causes an error when calling the `int()` method on the VAT number. **Fix:** This commit prevents errors and ensures users receive a `clear warning message`. [1]: https://github.com/odoo/odoo/blob/23398d24e108875b2838715d4b366df265d53234/addons/base_vat/models/res_partner.py#L929-L958 **No task Id**
This update fixes an issue where the web interface could crash when retrieving data due to outdated cached information. The change ensures a safer and more reliable way of filtering x2many records, aligning the system with recent improvements and preventing potential errors. This enhances overall web performance and stability.
Original PR description
Description of the issue/feature this PR addresses: This is a follow-up to #250904. The original 17.0 fix filtered inaccessible x2many records reused from cache during web_read. However, while…
Description of the issue/feature this PR addresses:
This is a follow-up to #250904.
The original 17.0 fix filtered inaccessible x2many records reused from cache during web_read. However, while forward-porting the fix to 18.0, additional issues were revealed.
The original issue is still cache pollution: web_read may reuse cached x2many ids that are not accessible anymore with the current record rules/context, and should neither expose them nor crash when formatting the result.
The 18.0 investigation showed that the first approach was not enough in all cases:
* using search([('id', 'in', ...)]) to filter x2many records is not always safe, as some models can override search() and raise errors
* using _filtered_access('read') unconditionally can also be too aggressive when the current user has no general read access on the comodel, as it may remove valid x2many values and break existing flows.
This PR backports the adjusted logic from the 18.0 forward-port to 17.0, so that 17.0 stays aligned with the later versions.
Current behavior before PR:
Even after the previous fix, web_read can still mishandle polluted cached x2many values in some cases, either by crashing while trying to filter/order the records, or by over-filtering them when the user has no general read access on the comodel.
Desired behavior after PR is merged:
web_read should keep filtering polluted x2many values when the user has read access on the comodel, while avoiding regressions for fields whose comodel is not generally readable by the current user.
The x2many values are therefore filtered in a safer way, aligned with the logic introduced in the 18.0 forward-port.
Backport-Of: #257517
X-original-commit: 05ded3eda89fb8ff9aafa62f314a9d5d4677d292 (cherry picked from commit 7eec72aadc294b1c2780e601e81636cffcc4965d)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr