Daily updates from Odoo
Friday, May 8, 2026
12 changes · 17.0
Resolved issues and error corrections
This update resolves an issue where payment validation with IoT printers in Point of Sale (POS) was failing to correctly redirect to the receipt screen. By including the necessary JavaScript file in the POS bundle, the system now properly handles printer selection and ensures a smooth payment process for users.
Original PR description
The select_printer_wizard.js was only declared in `web.assets_backend`, making it unavailable in the Point of Sale context. When validating a payment in POS with an invoice and an IoT printer configured on the invoice report, it was opening the printer selection wizard using the generic `FormController` instead of `selectPrinterFormController`. This caused the "printer-selected" bus event to never be emitted, leaving the post-validation Promise unresolved and blocking the redirect to the receipt screen. Fix by adding select_printer_wizard.js to point_of_sale._assets_pos. opw-5798014
This update resolves a checkout issue that prevented portal users with AvaTax tax exemptions from completing purchases with discounts. The problem stemmed from a tax recalculation error during the payment process. This fix ensures accurate tax calculations and allows users to successfully complete transactions with discounts and AvaTax integration.
Original PR description
Steps to reproduce: - Activate AvaTax in db - Configure a discount for a product in Discount & Loyalty - Log in as a portal user that has a tax exemption set in the AvaTax portal (Avalara) - Add the product with the discount to your cart - Try to check out Current Behavior: - You can't check out due to validation error Expected Behavior: - You can check out Clarification: You are currently unable to checkout under these conditions because when you hit pay, the final check does not recompute taxes which will lead to a mismatch and thus an error opw-5285825
This update corrects a discrepancy between the General Ledger search filter in the UI and the exported data. Previously, the export didn't include all accounts returned by the search filter due to a difference in how the search was implemented. This change ensures the exported data accurately reflects the search criteria, improving data consistency and reporting accuracy.
Original PR description
When applying a search filter in the General Ledger, the lines displayed in the UI differ from the ones exported. The discrepancy comes from the fact that the UI search bar filters lines using a simple "contains" logic on the displayed line name, while the backend export relies on the account model’s `_name_search` behavior, just as in the chart of accounts. For example, searching for "40" displays the accounts 400000, 400010, and 124000 but the last one (124000) is not is in the export results. task: 5917435
This update improves the speed of exporting the general ledger to an Excel file in version 17. The change eliminates unnecessary calculations within the export process, significantly reducing the export time from over 900 seconds to just 22.4 seconds. This results in a faster and more efficient reporting experience.
Original PR description
**Description:** In version 17, when we export the general ledger to an xls file, we now iterates over accounts fetched with `_get_accounts_with_move_lines` and perform a sum of the related amls balance, credit and debit. Source of this change: [103329](https://github.com/odoo/enterprise/pull/103329) Those sums are calculated through an SQL query built in `_get_query_sum`. However, it's currently inefficient because the query also computes the unaffected earnings of the company on each iteration, even though that information in only meant to be used if the account_type = 'equity_unaffected' in `_query_values`. **Benchmark:** | accounts | amls | before | after | |:---|:---|:---|:---| | 696 | 2819556 | >900s | 22.4s | **Reference:** opw-5904527
This update resolves a technical issue preventing invoices with Early Payment Discounts (EPD) and 0% tax from passing schematron validation, a requirement for Peppol compliance. The fix ensures accurate VAT breakdowns are generated, addressing a previous error where duplicate tax categories were created and a hardcoded tax code was used. This ensures invoices meet regulatory standards and avoids potential export failures.
Original PR description
Before this commit, creating an invoice with an Early Payment Discount (EPD) as a payment term could cause the schematron validation of the generated invoice to fail when an invoice line had a 0% tax. The issue was caused by generating two TaxSubtotal nodes for the same TaxCategory (0%, exemption code 'E'): - one for the 0% VAT - one for the EPD discount applied to the total amount However, Peppol requires a single VAT breakdown (TaxSubtotal) per VAT category (in this case: E) Additionally, when VAT was set to 0%, the allowance charge TaxSubtotal incorrectly used 'S' as a hardcoded tax category code. This commit fixes both issues. task-5900496 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where branch users without parent company access would encounter errors when creating transactions in foreign currency journals. The fix ensures proper access rights are used during currency conversion, allowing branch users to manage transactions accurately. This improves usability and avoids disruptions for users operating within branch environments.
Original PR description
**Problem:** When a branch user with no access to the parent company tries to create a transaction for a parent company's journal with a foreign currency set, this will raise an access error. **Steps to Reproduce:** - Make a branch of "My Company (San Francisco)" - Set user "Marc Demo" to only have access to the branch - Add a new bank journal set to "EUR" currency - Switch to Marc Demo - Try to add a transaction in the new bank journal **Root Cause:** When a transaction is created, Odoo determines the amount in company currency by converting it from the foreign currency. The method to convert currency uses "with_company()" to use the company's rates, but the allowed companies of the branch user does not have access to the parent company, causing an access error. **Solution:** Call the currency conversion with sudo() to ensure access to the relevant companies. Ticket [link](https://www.odoo.com/odoo/project.task/6186901) opw-6186901
This update fixes an issue where the cost of service sale order lines wasn't being calculated correctly when adding new lines to existing orders. The change ensures that the product's cost is accurately reflected, regardless of whether timesheets are associated or the product has a standard price. This improves the accuracy of pricing for service-based sales.
Original PR description
Steps to reproduce: --------------------------------------- 1. Install the `sale_timesheet_margin` module 2. Create a product as follows: * Type: Service * Invoicing Policy: Prepaid/Fixed Price *…
Steps to reproduce:
---------------------------------------
1. Install the `sale_timesheet_margin` module
2. Create a product as follows:
* Type: Service
* Invoicing Policy: Prepaid/Fixed Price
* Create on order: Nothing
* Cost: Add some cost to the product (e.g., 30)
3. Create and Confirm Sale Order with Product (Add Cost field in SOL from the optional field)
4. Now add a new Sales Order Line (SOL) with the same product
Observation:
---------------------------------------
The cost of the recently created Sales Order Line (SOL) is 0.0, which is not correctly calculated based on the product's cost.
Issue:
---------------------------------------
The `_compute_purchase_price` method has a filter (`service_non_timesheet_sols`) that excludes certain sale order lines from the parent's purchase price computation. When a new sale order line is added to an already confirmed sale order (state='sale'), the new line inherits the parent SO's state immediately. That means, the new line matches the filter criteria and gets excluded from parent computation. The `purchase_price` is never calculated from the product's `standard_price`
Solution:
---------------------------------------
The added condition, like EITHER:
1. Has timesheets recorded (`sol.timesheet_ids` is truthy) → Preserve existing cost
2. OR product has NO standard price (`not sol.product_id.standard_price`) → Use timesheet-based costing
Code intentionally skips the computation of `service_non_timesheet_sols` lines to preserve existing values
opw-5351724This update corrects a bug in how backorder receipts are valued, ensuring consistent USD pricing regardless of exchange rate differences between the bill date and receipt date. The change updates the calculation method for `receipt_value` to accurately reflect the correct exchange rate at the time of receipt, resolving discrepancies in stock valuation.
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-prThis update corrects a previous issue where product manufacturing quantities were incorrectly linked to planned production levels. Now, the system accurately reflects the actual quantity of products that have been produced, providing more reliable inventory data and reporting. This ensures better decision-making regarding stock levels and production planning.
Original PR description
* Before: the manufactured quantity on product use the planned quantity * After: Use actual produced quantity 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 resolves an issue where employees with capped leave accrual plans were sometimes blocked from requesting future time off. The fix adjusts how future leave accruals are calculated, ensuring employees can accurately see and request time off beyond their capped balance. This improves the user experience for employees managing their leave entitlements.
Original PR description
**Issue Summary:** Employees on capped accrual plans can sometimes be blocked from requesting time off in the future, even if they currently have enough available time. This happens when they've…
**Issue Summary:** Employees on capped accrual plans can sometimes be blocked from requesting time off in the future, even if they currently have enough available time. This happens when they've previously used more time off than the cap allows at one time. It's important to note that the cap sets the maximum balance an employee can hold at once, not a limit on the total amount they can accrue over time. For example, if the cap is 12 days, an employee can never hold more than 12 days at a time. However, as long as they continue using time off regularly, they can keep accruing more, theoretically without limit. To clarify what "future" means here: it refers to any date after the accrual plan's nextcall, which is the next scheduled update to the employee's balance. So even if they have time available now, they might not be able to request leave for dates beyond that point. Fix 1: See accruals even if the future leaves would be capped. - `_get_future_leaves_on` gives the difference between today's allocation and the allocation in the future after accruals. - However, if there's an accrual cap, and today's allocation is at the cap, Odoo can't see accruals in the future since no days would be accrued. - We want to see future accruals even if we're at the cap. - Solution: Calculate the future accruals as though it had no cap, then cap the gained leaves to the accrual cap. Fix 2: Base accruals on virtual leaves, not real leaves. - When leaves are virtual (not validated), `max_leaves` is too low because it's getting capped to 2, whereas with validated leaves it's 3 successfully. - This is the result of method `_process_accrual_plans` calling `_add_days_to_allocation` with the `leaves_taken` argument. It doesn't see non-validated leaves, but it should so that future leaves are correct. - Solution: Give `_add_days_to_allocation` virtual leaves instead of real leaves. Fix 3: Show correct max leaves for capped accruals in the Time Off Dashboard. - The `max_leaves` on leave types is computed based on the user's employee, and appears in the display name when creating new leaves in the dashboard. - `max_leaves` after Fix 1 will now report the full leaves amount, which in the Dashboard context is wrong since it will say "X out of [max_leaves]" but we need `max_leaves` to reflect the cap. - Solution: Add logic in `get_allocation_data` to cap `max_leaves` based on accrual cap. opw-4720344 Co-authored-by: Dirk Douglas <dido@odoo.com> Co-authored-by: Harrison Hutton <hahu@odoo.com>
This update corrects a bug where new job applications created with an email address would incorrectly duplicate the email as the applicant's name in the system. The fix ensures that the applicant's provided name is used when creating the partner record, improving data accuracy and usability within the recruitment process. This resolves an issue that impacted partner ordering in POS testing scenarios.
Original PR description
## Issue When creating a job application with a new email address, a `res.partner` is created with both its name and email set to the email address, even if a `partner_name` is provided. ## Steps to…
## Issue
When creating a job application with a new email address, a `res.partner` is created with both its name and email set to the email address, even if a `partner_name` is provided.
## Steps to reproduce
1. Install *Recruitment* (`hr_recruitment`) and *Contacts* (`contacts`)
2. In Recruitment, create a job application:
- Any Subject
- Name N
- Email E
3. Save the job application
4. Go to Contacts
5. **The partner created from the job application has both its name and email set to the Email E used to create the job application.**
## Cause
The `_inverse_partner_email` passes the email address to `find_or_create` to create the new res.partner:
https://github.com/odoo/odoo/blob/fc58ff23f491a2063b10ffcd6393a08b90dc7975/addons/hr_recruitment/models/hr_applicant.py#L317-L324
This method is implemented to parse both a name and an email address in the same string.
https://github.com/odoo/odoo/blob/fc58ff23f491a2063b10ffcd6393a08b90dc7975/odoo/addons/base/models/res_partner.py#L937-L945
We can thus provide both the `partner_name` and the `email_from` to the method to create a user with a name and an email address properly set.
## POS tests modifications
Before this first commit, some partners in `hr_recruitment` demo data were created with their email address as their name. This is the case, for example, for "Johan Duck", whose name was set to `coincoin@gmail.example.com`.
<img width="627" height="86" alt="260296" src="https://github.com/user-attachments/assets/e4bab843-8ba3-4930-af20-ca8603983929" />
In the POS tours, the list of loaded partners is limited to 100 partners and ordered by their order count (which is often null), __and their name__.
https://github.com/odoo/odoo/blob/e7345340efbd66473da70ccf6680181b158047ce/addons/point_of_sale/models/pos_config.py#L845-L865
By "renaming" the partners from `hr_recruitment`, they started appearing higher up in the list because their name now starts with capital letters whereas their email began with lower letters, which are sorted after capital letters by the `ORDER BY` SQL clause. As a result, partners from multiple tours were pushed out of the 100 first partners, meaning they were no longer loaded during the tours, causing the tests to fail.
One solution, which is already used in other tests, is to give the test partners names that make them appear higher in the partner list, ensuring they remain within the first 100 loaded partners.
opw-6111598This update reverts a previous change to the user signup process to ensure compatibility with existing customizations. It validates user input during signup and provides autocomplete suggestions, enhancing the user experience while preventing potential disruptions to existing workflows.
Original PR description
This reverts commit fcb80cce1c4b5a24600b061ae0520b86b6c25eff. As discussed in [1], the change may break existing customizations or workflows using non-email logins. [1]: https://github.com/odoo/odoo/pull/258967 task-6094631