Daily updates from Odoo
Monday, June 1, 2026
327 changes
3 changes
Resolved issues and error corrections
This update resolves an issue where date formatting in the spreadsheet module was inconsistent due to changes in Chrome's internal formatting. The fix ensures a consistent output for all date values, regardless of the Chrome version used for testing. This improves the reliability and predictability of spreadsheet data.
Original PR description
Some dependencies in the chrome build changed between chrome 145 and 148 which changes the output value of luxon.Interval.toLocaleString, more specifically, some space characters were changed and the tests can pass or not depending on the chrome version they run with. This revision forces a standardized output. task-6233171 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#267254 Forward-Port-Of: odoo/odoo#265565
This update corrects a bug in stock valuation reports that previously displayed incorrect values (zero cost and value) for AVCO products with fully consumed lots. The fix ensures the report accurately reflects inventory levels at a specific date, regardless of current stock quantities. This improves the reliability of financial reporting.
Original PR description
When using the stock valuation report with 'inventory at date', lot valuated AVCO products whose lots had been fully consumed were showing zero unit cost and total value, despite having correct quantities at given dates.
The root cause was a ('product_qty', '!=', 0) domain filter in product.product._compute_value that evaluates product_qty at the current date, not at to_date. Lots fully consumed after were excluded from the recordset as they have no quantities left.
After this fix: adding the 'not at_date' will make sure that when fetching the inventory at date, we do so regardless of their current stock level.
OPW: 6115200
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262111
Forward-Port-Of: odoo/odoo#262008This update fixes an issue where the website builder was incorrectly adding paragraph tags when inserting icons. The change ensures icons are only wrapped in `<p>` elements when dropped between blocks of text, preventing unwanted line breaks and formatting problems. This improves the overall consistency and usability of the website builder.
Original PR description
When the "icon" snippet is dropped, after the icon is selected and inserted, a call to `wrapInlinesInBlocks` ensures the icon is wrapped in a `<p>` element. The added `p` is only desired when the icon snippet is dropped between blocks, and it is problematic when the icon snippet is dropped "inline". This commit only wraps the icon if needed (aka, the parent `allowsParagraphRelatedElements`) Steps to reproduce: - Open website builder - Select a span of text and turn it bold - Type `/button` inside the bold text and add a button - Drag and drop the "Icon" snippet (an inner content snippet) - Select any icon - Bug: a `<p>` element is added in the `strong` element (which is invalid html), and this adds line breaks (and the style is affected if the line breaks are manually deleted) task-6251585 Forward-Port-Of: odoo/odoo#266735
8 changes
Enhancements to existing features
This update enhances the design of Odoo's documentation links by adding styling options through 'class' props. Previously, these links were fixed in appearance, limiting their use in different contexts. Now, developers can easily customize the links to fit various design needs, increasing their versatility.
Original PR description
Before this commit, the style of that component is fixed, thus it is not possible to customize it to render that component as a secondary button neither display it as dropdown item. This commit adds the `class` props in that component to be able easily change the style to use that component anywhere. task-6095833 Forward-Port-Of: odoo/odoo#267114
Resolved issues and error corrections
This update removes a confusing placeholder in the accounting module that encouraged users to create specific ledger types. The change streamlines the process by removing the suggestion and acknowledging the existing 'Local GAAP' option, improving clarity and reducing potential errors for users.
Original PR description
The placeholder 'e.g. GAAP, IFRS, ...' is confusing for the users as it encourages them to create a GAAP ledger, or there is already an implicit ledger for that called 'Local GAAP'. task-6260588 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a reporting issue where the 'Local GAAP' implicit ledger would sometimes appear empty when all company journals were assigned to a single ledger. Removing this empty ledger from report selections ensures accurate and consistent financial reporting for users. This improves the reliability of key financial reports.
Original PR description
When all journals of the company are in a ledger, the implicit ledger 'Local GAAP' is empty, so we remove it from the ledger selection in the reports. task-6260588
This update resolves an issue where date formatting in the spreadsheet module was inconsistent across different Chrome versions. A change in underlying dependencies caused variations in how dates were displayed, leading to test failures. This revision ensures a consistent and reliable date format is used within the spreadsheet functionality.
Original PR description
Some dependencies in the chrome build changed between chrome 145 and 148 which changes the output value of luxon.Interval.toLocaleString, more specifically, some space characters were changed and the tests can pass or not depending on the chrome version they run with. This revision forces a standardized output. task-6233171 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#267254 Forward-Port-Of: odoo/odoo#265565
This update adds a direct link within the Timesheets Assistant interface to the relevant documentation. This makes it easier for users to quickly find information and support related to the Timesheets Assistant feature. It's a small change intended to improve user experience and knowledge access.
Original PR description
This commit adds documentation link in Timesheets Assistant to redirect the user to the documentation of Timesheets Assistant. task-6095833 Forward-Port-Of: odoo/enterprise#118754
This update corrects an issue where the historical FIFO valuation in stock reports was fluctuating due to how standard prices were recalculated. The fix ensures that valuations at a specific date remain stable, accurately reflecting inventory value as intended. This improves the reliability of financial reporting.
Original PR description
When the stock valuation closing report computes FIFO valuation at a historical date, it recomputes each move's value via `move._get_value(at_date)`. For moves without a purchase link (inventory…
When the stock valuation closing report computes FIFO valuation at a historical date, it recomputes each move's value via `move._get_value(at_date)`. For moves without a purchase link (inventory adjustments, initial inventory), the value falls through to `_get_value_from_std_price()` which uses the current `standard_price`. For FIFO products, `standard_price` is recalculated on every stock operation (`total_value / qty_available`), so the historical valuation drifts as new operations are processed. This is the same root cause as https://github.com/odoo/odoo/commit/d2934b59e49ef943d957a80e53cca835a59fabef which fixed it for AVCO's `_run_average_batch` by passing `forced_std_price`. This commit fixes the FIFO path by using `move.value / move._get_valued_qty()` (the unit price stored at validation time) as the fallback in `_get_value_from_std_price` when `at_date` is set and no std_price was explicitly forced. Steps to reproduce (in `odoo-bin shell`, using freezegun's `freeze_time` to backdate two operations to different dates, e.g. date1 = two days ago and date2 = yesterday): 1. Create a FIFO periodic product with `standard_price = 10` 2. With `freeze_time(date1)`: apply an inventory adjustment of 10 units 3. With `freeze_time(date2)`: receive 10 units at unit cost 20 > standard_price shifts to 15 4. Check `product.with_context(to_date=date1).total_value` > Before fix: 150 (drifted with current standard_price) > After fix: 100 (stable, uses stored move value) closes opw-6081736 Forward-Port-Of: odoo/odoo#262127
This update resolves a problem where users authenticating with standard Polish certificates were incorrectly rejected by KSeF. The change expands the certificate matching logic to correctly identify certificate types, restoring functionality for existing users and supporting new setups without requiring any UI changes. This ensures seamless authentication for our Polish customers.
Original PR description
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard…
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard certificates (AKA `certificateSubject`). Because the matching logic strictly checked for the company NIP within the certificate subject, it failed for users using personal PESEL certificates to act on a company's behalf. **Previous PR:** https://github.com/odoo/odoo/pull/264851 **Solution:** Expanded the string-matching heuristic in the XML signer to strip formatting characters from the NIP and explicitly checks for standard Polish qualified certificate prefixes (VATPL and PNOPL) to accurately get the identifier type. ### Current behavior before PR: When a user logs in via a personal PESEL certificate for a company context, the NIP check fails and miscategorizes the payload as a `certificateFingerprint`. KSeF rejects this mismatch, causing a 400 error for previously working setups. ### Desired behavior after PR is merged: The authentication flow distinguishes between `certificateSubject` and `certificateFingerprint` by checking for valid Polish prefixes or exact cleaned NIP matches. Existing customers are restored to working order natively, and new customers using manual fingerprints are still supported without requiring any database or UI changes. opw-6251153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267060
This update optimizes the performance of the MRP work order display, specifically during tasks like resizing windows or scrolling. By changing a technical selector, the system now recalculates styles more efficiently, leading to a smoother user experience. This is a minor improvement focused on responsiveness.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior, this reduces work during the "Recalculate Style" phase. It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. Forward-Port-Of: odoo/enterprise#118618
5 changes
Resolved issues and error corrections
This update significantly improves the performance of the VAT Books ES report by processing invoices in batches instead of loading everything into memory at once. This prevents crashes and slowdowns caused by excessive memory usage, especially with large invoice volumes, ensuring reports generate reliably.
Original PR description
### Description of the issue/feature this PR addresses: This PR introduces batch processing to the VAT Books ES (Libros de IVA) report generation. When attempting to export the report for periods…
### Description of the issue/feature this PR addresses: This PR introduces batch processing to the VAT Books ES (Libros de IVA) report generation. When attempting to export the report for periods containing a massive volume of invoices, the ORM cache continuously accumulates records, leading to severe memory consumption. By implementing batching and explicitly clearing the environment cache, use memory use will remain stable and efficient. ### Current behavior before PR: Generating the VAT Books report loads all account move lines into memory at once. Because the ORM cache is never cleared during the iteration, RAM usage spikes continuously. On databases with tens or hundreds of thousands of invoices in a single period, this leads to significant performance degradation, worker timeouts, or complete Out-Of-Memory (OOM) crashes. ### Desired behavior after PR is merged: The report engine now splits the recordset into manageable batches (e.g., 50,000 accounts per batch). After processing each chunk to extract the income and expense line values, invalidate_model() is called to flush the ORM cache related to the searched records. This frees up memory continuously, keeping the server's RAM usage flat and allowing the successful export of massive datasets without crashing. ### Benchmark: The model is iterating through ~1.1M account move lines when generating the full report. For Memory: | # Input Data | Before PR | After PR| | -------- | -------- | -------- | | ~77,000 account move lines | 385 MB | 666 MB | | ~340,000 account move lines |1.2 GB | 1.5 GB | | ~1.2M account move lines | MemoryError | 1.5 GB | For Speed: | # Input Data | Before PR | After PR| | -------- | -------- | -------- | | ~77,000 account move lines | 32s | 12s | | ~340,000 account move lines | 2:29min | 1:11min | | ~1.2M account move lines | MemoryError | 4:11min | ### Reference opw-6037414 ----------------------------------------------------------------- I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr) Forward-Port-Of: odoo/enterprise#116139
This update corrects an issue where the historical FIFO valuation in stock reports was becoming unstable due to how standard prices were recalculated. The fix ensures that valuations at a specific date remain consistent, regardless of subsequent stock movements, leading to more accurate inventory reporting. This improves the reliability of financial data.
Original PR description
When the stock valuation closing report computes FIFO valuation at a historical date, it recomputes each move's value via `move._get_value(at_date)`. For moves without a purchase link (inventory…
When the stock valuation closing report computes FIFO valuation at a historical date, it recomputes each move's value via `move._get_value(at_date)`. For moves without a purchase link (inventory adjustments, initial inventory), the value falls through to `_get_value_from_std_price()` which uses the current `standard_price`. For FIFO products, `standard_price` is recalculated on every stock operation (`total_value / qty_available`), so the historical valuation drifts as new operations are processed. This is the same root cause as https://github.com/odoo/odoo/commit/d2934b59e49ef943d957a80e53cca835a59fabef which fixed it for AVCO's `_run_average_batch` by passing `forced_std_price`. This commit fixes the FIFO path by using `move.value / move._get_valued_qty()` (the unit price stored at validation time) as the fallback in `_get_value_from_std_price` when `at_date` is set and no std_price was explicitly forced. Steps to reproduce (in `odoo-bin shell`, using freezegun's `freeze_time` to backdate two operations to different dates, e.g. date1 = two days ago and date2 = yesterday): 1. Create a FIFO periodic product with `standard_price = 10` 2. With `freeze_time(date1)`: apply an inventory adjustment of 10 units 3. With `freeze_time(date2)`: receive 10 units at unit cost 20 > standard_price shifts to 15 4. Check `product.with_context(to_date=date1).total_value` > Before fix: 150 (drifted with current standard_price) > After fix: 100 (stable, uses stored move value) closes opw-6081736 Forward-Port-Of: odoo/odoo#262127
This update optimizes Odoo's performance when displaying large tables, like the Accounting > Balances Sheets. By using a more targeted approach to style recalculations, the system now responds more quickly to actions like hovering, resizing windows, and sorting data, leading to a smoother user experience.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior. This reduces work during the "Recalculate Style" phase (for example when hovering rows in large tables such as the Accounting > Balances Sheets). It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. similar fix: https://github.com/odoo/enterprise/pull/118535 Forward-Port-Of: odoo/odoo#266954
This update resolves a problem where users authenticating with Polish certificates were incorrectly rejected. The change expands the certificate matching logic to correctly identify certificate types, restoring functionality for existing users and supporting new setups without requiring any UI changes. This ensures continued compliance with KSeF regulations.
Original PR description
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard…
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard certificates (AKA `certificateSubject`). Because the matching logic strictly checked for the company NIP within the certificate subject, it failed for users using personal PESEL certificates to act on a company's behalf. **Previous PR:** https://github.com/odoo/odoo/pull/264851 **Solution:** Expanded the string-matching heuristic in the XML signer to strip formatting characters from the NIP and explicitly checks for standard Polish qualified certificate prefixes (VATPL and PNOPL) to accurately get the identifier type. ### Current behavior before PR: When a user logs in via a personal PESEL certificate for a company context, the NIP check fails and miscategorizes the payload as a `certificateFingerprint`. KSeF rejects this mismatch, causing a 400 error for previously working setups. ### Desired behavior after PR is merged: The authentication flow distinguishes between `certificateSubject` and `certificateFingerprint` by checking for valid Polish prefixes or exact cleaned NIP matches. Existing customers are restored to working order natively, and new customers using manual fingerprints are still supported without requiring any database or UI changes. opw-6251153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267060
This update resolves an issue where product variant prices didn't automatically update when the cost price changed. Previously, users had to manually switch price lists to trigger the update. The fix ensures that the ‘On Sale Price’ dynamically reflects changes to the product’s cost price, streamlining pricing management.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and…
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995 Forward-Port-Of: odoo/enterprise#117806 Forward-Port-Of: odoo/enterprise#111892
2 changes
New functionality added to Odoo
This update adds a new report, MUHSGK V2 (1003B), required for Turkish clients to submit monthly payroll data to the SGK and GİB authorities. This ensures compliance with Turkish regulations regarding withheld taxes and social insurance contributions, streamlining reporting processes.
Original PR description
On a monthly basis, all clients in Turkey are obligated to submit reports to the social insurance entity (SGK) and the revenue authority (GİB). The reports include details about the employee, employer, and amounts deducted from the employee's salary to be submitted to the authorities. The main report for this task is the MUHSGK V2 (1003B), which is a combined report for both withheld taxes from employees' salaries and withheld amounts for social insurance. task-id: 4966571
Resolved issues and error corrections
A technical issue causing a traceback when users accessed the tax declaration feature in the Odoo Enterprise system has been resolved. The fix corrects a problem where a template was incorrectly referencing a missing variable, ensuring the tax declaration button functions without errors. This improves the user experience for employees.
Original PR description
Version: - saas-19.4 Steps to reproduce: - install l10n_in_hr_payroll - open employee form view - click on the tax declaration button - occur traceback Issue: - Getting a traceback when clicking on the tax declaration button. Cause: - template was reading `declarations` as a template variable, which was never defined, so its value was undefined. Fix: - use `this.declarations` instead of `declarations` in t-set so It correctly reads the data loaded from the component. task-6246920
2 changes
Resolved issues and error corrections
This update corrects a technical issue preventing vendor bills (DAM documents) from being correctly processed by the SUNAT system. The previous code incorrectly extracted data from the document number, leading to immediate rejection by the system. This fix ensures the correct 3-digit customs dependency code is used, complying with SUNAT regulations.
Original PR description
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the…
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the standard pediment format (e.g. C235202610-38047). * Go to Accounting > Reporting > Purchase Electronic Record (RCE 8.4). * Export the TXT file and open it. **Observed behavior:** * Field 8 contains the full first numeric block of the document name including the year and sequence digits (e.g. 235202610) instead of only the 3-digit customs dependency code. * SUNAT/SIRE rejects the file immediately because 235202610 does not exist in Table 4 (RS 040-2022), which only defines 3-digit codes. **Cause:** * `_get_serie_folio()` splits the document name by taking everything before the last digit group as the serie. For a name like C235202610-38047 this produces serie = "C235202610", and the existing `serie[1:]` logic strips only the leading letter, leaving "235202610" in field 8 instead of the 3-digit customs dependency code "235". * The same incorrect value was also written to field 28 (aduana_code). * ref : https://www.sunat.gob.pe/legislacion/superin/2022/anexo-040-2022.pdf **Fix:** * For document types 50 and 52, extract the first numeric group from the document name using `re.search(r'\d+', move_name)` and slice the first 3 characters to obtain the customs dependency code as defined in SUNAT Table 4 (always a 3-digit value). * Apply the same logic to field 28 (aduana_code) for consistency. opw-6157662 Forward-Port-Of: odoo/enterprise#115406
This update fixes an issue where intercompany sales and purchases with multiple identical products resulted in incorrect stock reservation during receipt picking. Specifically, the system was failing to properly reserve all units of a product when creating intercompany transactions with multiple lines. This ensures accurate stock tracking and prevents discrepancies between sales orders, purchase orders, and receipts.
Original PR description
…lit for same-product lines When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned: - Enable Inter-Company…
…lit for same-product lines
When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned:
- Enable Inter-Company Transactions on both companies (Create and validate)
- Create SO in company A to company B with 2 lines having the same product P, Confirm. => Delivery in company A, Purchase and Receipts in company will be created => The SO/PO/Delivery/Receipt will all have 2 lines
- Validate delivery => On the receipt, the 2 units of P are reserved on the 1st move, and the 2nd move is not reserved.
https://github.com/user-attachments/assets/b4816051-120e-4226-9228-fd552649d5ef
---
### Test result without fix:
```
2026-04-23 13:16:44,577 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: Starting TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product ...
2026-04-23 13:16:44,949 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: ======================================================================
2026-04-23 13:16:44,949 48027 ERROR oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: FAIL: TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product
Traceback (most recent call last):
File "/home/odoo/Odoo/src/18.0/enterprise/sale_purchase_stock_inter_company_rules/tests/test_inter_company_so_to_po.py", line 109, in test_02_inter_company_multiple_lines_with_same_product
self.assertRecordValues(purchase_from_a.picking_ids.move_ids, [
File "/home/odoo/Odoo/src/18.0/odoo/odoo/tests/common.py", line 709, in assertRecordValues
self.assertSequenceEqual(expected_reformatted, record_reformatted, seq_type=list)
AssertionError: Lists differ: [{'pr[18 chars]0, 'quantity': 1.0}, {'product_uom_qty': 1.0, 'quantity': 1.0}] != [{'pr[18 chars]0, 'quantity': 2.0}, {'product_uom_qty': 1.0, 'quantity': 0.0}]
First differing element 0:
{'product_uom_qty': 1.0, 'quantity': 1.0}
{'product_uom_qty': 1.0, 'quantity': 2.0}
- [{'product_uom_qty': 1.0, 'quantity': 1.0},
? ^
+ [{'product_uom_qty': 1.0, 'quantity': 2.0},
? ^
- {'product_uom_qty': 1.0, 'quantity': 1.0}]
? ^
+ {'product_uom_qty': 1.0, 'quantity': 0.0}]
? ^
```
OPW-6145683
Forward-Port-Of: odoo/enterprise#118548
Forward-Port-Of: odoo/enterprise#1148731 change
Resolved issues and error corrections
This update corrects a bug in how backorder receipts are valued, ensuring consistent USD pricing regardless of exchange rate fluctuations between the bill date and receipt date. The change updates the calculation method for receipt value, resolving discrepancies that previously resulted in incorrect unit costs for backordered items.
Original PR description
Configuration: - Costing method: FIFO, automated valuation - Multi-currency: PO in a foreign currency (e.g. EUR), company currency USD - Two different exchange rates: one active at bill date, one at…
Configuration:
- Costing method: FIFO, automated valuation
- Multi-currency: PO in a foreign currency (e.g. EUR), company currency USD
- Two different exchange rates: one active at bill date, one at receipt date
- Bill posted before any goods are received
Steps to reproduce:
- Set EUR as a secondary currency with two different rates:
- Rate 1 on January 1st: 1 EUR = 1 USD
- Rate 2 on January 8th: 1 EUR = 2 USD
- Create a PO in EUR for 20 units @ 10,000 EUR
- Post the vendor bill dated January 3rd (rate 1 applies: 1 EUR = 1 USD)
- Receive 10 units on a date after January 8th and create a backorder
- Receive the remaining 10 units from the backorder on the same date
- Inspect the stock valuation layers and interim account journal entries for both receipts
Prior to this commit:
The two receipts, identical in quantity, date, and PO price, would produce different unit costs in USD. The backorder receipt would be incorrectly valued due to a wrong exchange rate being used when computing `receipt_value` in `_get_price_unit()`.
Receipt 2 (backorder):
SVL 1 value: $100,000 USD
Converted to EUR at receipt date (1 USD = 0.5 EUR):
receipt_value = $100,000 × 0.5 = 50,000 EUR (wrong rate)
total_invoiced_value = 200,000 EUR
remaining_value = 200,000 - 50,000 = 150,000 EUR
remaining_qty = 20 - 10 = 10
price_unit = 150,000 / 10 = 15,000 EUR
Converted to USD at bill date (1 EUR = 1 USD):
price_unit = $15,000 USD
SVL value = $15,000 × 10 = $150,000
This bug only affects backorder receipts. The first receipt always gets `receipt_value = 0` (no prior SVLs exist), so the problematic conversion never runs.
After this commit:
`receipt_value` is now computed using `_get_currency_convert_date()` instead of `layer.create_date`. This ensures `receipt_value` and `total_invoiced_value` are both expressed in EUR at the same reference rate.
Receipt 2 (backorder):
SVL 1 value: $100,000 USD
Converted to EUR at bill date (1 EUR = 1 USD):
receipt_value = $100,000 × 1.0 = 100,000 EUR (correct rate)
total_invoiced_value = 200,000 EUR
remaining_value = 200,000 - 100,000 = 100,000 EUR
remaining_qty = 20 - 10 = 10
price_unit = 100,000 / 10 = 10,000 EUR
Converted to USD at bill date (1 EUR = 1 USD):
price_unit = $10,000 USD
SVL value = $10,000 × 10 = $100,000
Both receipts now produce identical unit costs regardless of exchange rate differences between bill date and receipt date.
OPW: 5426718
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2625776 changes
Resolved issues and error corrections
This update ensures that sales orders can now send emails using the user-selected email template, rather than the standard one. Previously, the system ignored custom default templates. This change improves flexibility and allows for branded email communications.
Original PR description
Steps to reproduce: --- - Install the `Sales` module. - Create a sale order and click Send by Email. - Select an email template other than the default one. - Open the Developer Tools (debug icon) > Set Default values. - Set the selected template as the default and save. - Try to send an email for a sale order again. Issue: --- - The newly saved default email template is ignored, and the system continues to load the standard template. Root cause: --- - The `Send by Email` action does not check for custom default templates set before loading the composer. Solution: --- - Modify the logic in the sales module to check for and respect saved default templates for the sale order model. opw-6187942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where Odoo's session tests were failing in Python 3.14 due to a change in how Python handles function pickling. The fix ensures the tests accurately detect the correct error type, maintaining the stability of the session serialization process.
Original PR description
Python 3.14 now raises `pickle.PicklingError` instead of `AttributeError` when attempting to pickle local functions or lambdas. This updates the session serialization assertions to expect the correct exception depending on the current Python version. runbot-938172
This update corrects a technical issue within the Odoo accounting module that could cause errors when handling attachments without content. The fix ensures the system doesn't generate tracebacks, improving stability and preventing potential disruptions to users. This change focuses on internal technical improvements.
Original PR description
In https://github.com/odoo/odoo/commit/b86104514acf631003812ba8d120cc7b69d7da95 guess_mimetype is given a string fallback in case of no attachment content. However the fallback type is wrong and may lead to a traceback. no-opw
This update fixes an issue where SII invoice JSON files weren't correctly displaying quarterly tax periods. The change ensures that the generated JSON accurately reflects the company's chosen quarterly periodicity, aligning with Spanish tax regulations. This improves data accuracy for tax reporting.
Original PR description
### Issue: When the company `tax_periodicity` is set to quarterly, the generated SII invoice JSON still uses the monthly period format According to the documentation, the options for Periodo include…
### Issue: When the company `tax_periodicity` is set to quarterly, the generated SII invoice JSON still uses the monthly period format According to the documentation, the options for Periodo include distinction between monthly and trimester (p224 - 225): https://sede.agenciatributaria.gob.es/static_files/Sede/Procedimiento_ayuda/G417/FicherosSuministros/V_1_1/SII-Descripcion-ServicioWeb-v1-1_es_es.pdf ### Cause: The invoice JSON generation does not consider the company's `tax_periodicity` This logic was probably omitted because `account_reports` may not be installed However, when the periodicity is configured, the generated SII document should reflect it correctly ### Steps to reproduce: - Install `l10n_es_edi_sii` and `account_reports` - In Settings, set `Tax Periodicity` to `Quarterly` - In Settings, set `Tax Agency for SII` to `Agencia Tributaria Española` - Change ES Company vat number to `ESA12345674` - Create an invoice (Date: 01/05/2026, Customer: ES Company) - Open the generated JSON document - Check the Periodo value, it should be 2T in May opw-6050587
This update corrects a bug where invoices on the customer portal were not sorted correctly by payment status. The fix changes the sorting field to reflect the actual payment state (e.g., 'In Payment') instead of the invoice's internal status. This ensures customers see invoices in the correct order based on their payment progress.
Original PR description
Steps to produce: --- - Install the `Accounting` module. - Create several invoices for a portal user with different payment states (e.g., In Payment, Not Paid, Paid). - Log in as the portal user. -…
Steps to produce: --- - Install the `Accounting` module. - Create several invoices for a portal user with different payment states (e.g., In Payment, Not Paid, Paid). - Log in as the portal user. - Navigate to the invoices list and attempt to sort by **Status**. Issue:- --- - Sorting by **Status** does not reflect the actual invoice payment status, resulting in incorrect ordering. Root cause: --- - At [1], the sorting field for Status is set to state, which corresponds to invoice states (Draft, Posted, Cancelled). However, the portal displays and expects sorting based on payment_state. Fix: --- - Update the sorting configuration to use payment_state instead of state, ensuring that invoices are sorted correctly according to their payment status on the portal. [1]https://github.com/odoo/odoo/blob/5b85287ec4ea9f1b51e0f33402900777dfeeb725/addons/account/controllers/portal.py#L46-L52 opw-6128998 --- 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 duration of calendar events created via drag-and-drop wasn't accurately displayed in the full event form. Users could now correctly see the event's duration based on their adjusted end time after creating it. This ensures a more accurate and intuitive event management experience.
Original PR description
When creating a calendar event by dragging on the calendar view, modifying the end time in the quick-create popover, and then clicking "More Options", the duration shown in the full form is the…
When creating a calendar event by dragging on the calendar view, modifying the end time in the quick-create popover, and then clicking "More Options", the duration shown in the full form is the original drag value instead of the value implied by the user's updated stop. calendar's makeContextDefaults seeds default_start, default_stop, default_duration, and default_allday from the drag extent. In the quick-create popover, changing stop triggers _compute_duration on that record so its duration becomes correct. On "More Options", goToFullEvent extracts a whitelist of fields from the quick-create record as default_X and merges them with the original drag context. https://github.com/odoo/odoo/blob/c82341c503ac/addons/calendar/static/src/views/calendar_form/calendar_quick_create.js#L9-L19 duration is missing from that whitelist, so the merged context still carries the stale default_duration from the drag. In the full form, that default is applied to the duration field and _compute_duration does not run because a default was provided for a stored, writable field. Adding duration to the whitelist forwards the quick-create's recomputed value as default_duration so the full form opens with the correct duration. Steps to reproduce: 1. Open Calendar, drag to create a 2-hour event (e.g. 10:00-12:00) 2. In the quick-create popover, change the end time to 14:00 3. Click "More Options" 4. Check the Duration field in the full form => Duration shows the original drag value (02:00) instead of 04:00 opw-6087449