Daily updates from Odoo
Thursday, May 28, 2026
17 changes · 18.0
Enhancements to existing features
This update enables Odoo to fully receive Peppol invoices, including optional fields created in Studio. Previously, Odoo only supported sending these extra fields, preventing users from receiving fully compliant invoices. This enhancement ensures invoices meet industry standards and improves data accuracy.
Original PR description
Currently, Odoo allows sending invoices with additional Peppol fields, but didn't support the receiving. This limitation prevents users from receiving fully compliant invoices. After this commit, users will be able to receive these extra fields if they already created them using Studio. task-6033667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update enhances the Point of Sale experience by ensuring that when a product is scanned with a barcode, the product configuration automatically preselects the variant details (like color) that match the scan. This mirrors the behavior of searching for a product by barcode, creating a more consistent and user-friendly experience for sales staff.
Original PR description
When a barcode scan matches a specific product variant, the product configurator now behaves the same as when the user searches by barcode: - The `always`-mode attribute (e.g. Color) is preselected from the matched variant instead of being hidden or left blank. - The `no_variant`-mode attributes (e.g. Size) are shown for user input. opw-6220883 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This update resolves an issue where installing point-of-sale demo data with localization modules (like India) caused a UserError due to a missing bank journal. The fix ensures the journal is created earlier in the loading process, preventing the error and allowing demo data to install correctly.
Original PR description
## Problem When creating a database with a country selected (e.g. India, or any country with a localization module), installing point_of_sale with demo data enabled raises a UserError about a missing…
## Problem
When creating a database with a country selected (e.g. India, or any
country with a localization module), installing point_of_sale with demo
data enabled raises a UserError about a missing bank journal, causing
the entire demo data installation to fail with this warning:
Module point_of_sale demo data failed to install, installed without demo data
The issue does NOT occur when no country is selected during database
creation, because Odoo falls back to generic_coa which sets up all
journals before POS demo data loads.
## Root Cause
Module loading follows this sequence:
data -> demo -> state='installed' -> commit
When a localization module (e.g. l10n_in) reaches the installed state,
the IrModule.write override detects the missing chart template on the
main company and stores try_loading on registry._auto_install_template.
However, this deferred loading is only executed in _register_hook, which
runs after ALL modules have finished loading.
When point_of_sale loads after l10n_in but before _register_hook fires,
its demo data calls load_onboarding_furniture_scenario() which calls
_create_journal_and_payment_methods(). At this point the bank journal
from the localization has not been created yet, causing the crash.
Debug proof:
With India selected at DB creation:
Chart Template: False
Journals available: Cash Furn. Shop (cash), Point of Sale (general)
Bank journal found: False <- causes UserError
With no country selected:
Chart Template: generic_coa
Journals available: Bank (bank), Cash (cash), Customer Invoices (sale), ...
Bank journal found: True <- works fine
## Fix
Add a cr.precommit call in IrModule.write to execute
_auto_install_template. This ensures the chart template and its journals
get loaded at the end of the localization module's loading cycle (at its
commit), making the bank journal available for subsequent modules like
point_of_sale during their loading phase.
The _register_hook fallback is kept as a safety measure and now simply
acts as a no-op if the precommit already handled the installation.
## Steps to Reproduce
1. Create a new database from /web/database/manager
2. Enable Load Demo Data
3. Select any country (e.g. India)
4. Login and install point_of_sale
5. Observe warning: Module point_of_sale demo data failed to install
## Expected Result
point_of_sale demo data installs successfully regardless of which
country/localization is selected at database creation.This update resolves an error that occurred when sending invoices in Denmark using the OIOUBL 2.1 format. The system incorrectly assigned this format without a valid VAT number, causing invoice sending failures. This fix ensures the correct OIOUBL format is only applied when a VAT number is provided, improving invoice processing reliability.
Original PR description
**Steps to reproduce:** - Install `l10n_dk_nemhandel` and switch to a DK Company. - Create a user with country set to Denmark. - Observe that the e-invoice format is automatically set to OIOUBL 2.1. - Create and confirm an invoice for this user. - Attempt to send the invoice via email. **Observed behavior**: Sending the invoice raises an error: _'Error occurred while creating EDI document (OIOUBL 2.1 Format): TaxId is required for user'._ **Cause**: OIOUBL 2.1 format is auto-assigned when the country is Denmark, even if the VAT number is not defined. **Fix**: Update `_get_suggested_invoice_edi_format` to assign OIOUBL 2.1 only when a VAT number is present. opw-6051096
This update resolves an issue where the translation dialog for HTML fields (like survey descriptions) would appear empty when the field was blank. The fix ensures that the dialog correctly displays with one row per installed language, allowing users to translate even empty fields. This improves the user experience when creating and managing translations.
Original PR description
The translation dialog of a translatable html field stays empty when the field has no value. A Char field like a survey question title shows one row per installed language, but the html Description…
The translation dialog of a translatable html field stays empty when the field has no value. A Char field like a survey question title shows one row per installed language, but the html Description field on the same form shows no rows and no inputs. get_field_translations builds the dialog rows. For an html field the translate attribute is the html_translate callable, so the rows come from the translatable terms found in the en_US value. An empty value has no terms, so the method returns an empty list and the dialog has nothing to render. update_field_translations also returns early when the field has no stored value, so a translation typed into the dialog could not be saved either. The fix lives in BaseModel because the behaviour is shared by every translatable html field, not by one model. get_field_translations now returns one empty row per installed language when a callable-translate field has no terms, and reports translation_show_source as false so the dialog uses the whole value layout like a Char field. update_field_translations routes a callable-translate field with no stored value through the same whole value write path already used by translate=True fields, so the first translation is stored. Steps to reproduce: 1. Settings > Translations > Add Languages: add and load a second language, e.g. French. 2. Surveys: open a survey, Questions tab, click a question to open its form. 3. Open the Description tab and leave the description empty. 4. Click the EN button on the Description field. => the translation dialog opens with no languages and no input fields Ticket [link](https://www.odoo.com/odoo/project.task/6237291) opw-6237291
This update fixes a technical issue that caused a traceback when attempting to mark workorders as done in certain scenarios, specifically when no workorders were open. The change ensures the system handles empty recordsets gracefully, preventing errors and improving stability.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910
This update fixes an issue where group holiday accruals were incorrectly showing as zero when the allocation start date was in the past. The change ensures that accrual calculations are properly computed and applied, resolving a discrepancy in holiday allocation amounts. This improves the accuracy of holiday tracking for employees.
Original PR description
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To…
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To reproduce: 1. Create an accrual plan with an easily measurable milestone (e.g. 1 day every day) 2. From the allocations view -> New Group Allocation 3. Enter the following values: Grant -> By Employee Employees -> select your employee Time Off Type -> Paid Time Off (doesn't matter too much) Allocation Type -> Based on Accrual Plan Validity Period -> any date a few days in the past (Personally I tested with 1/1/2025 and no end date) Allocation -> Keep at 0 Allocate Time Off 4. Go to the newly created allocation The allocation amount is 0. Reason ---------------------- When creating group allocations, the `hr.leave.allocation.generate.multi.wizard` calls the `_process_accrual_plans()` method to compute the accruals, but when the allocations are created, the nextcall and lastcall fields are set, so the accruals are not computed and the scheduled action also does nothing until the nextcall date. The onchange method manually sets the nextcall date to False so the accruals are processed. Solution ------------------ Created a method to get the fields that need to be set to calculate the initial accrual amounts from the start date, which is called both in the onchange and to batch write in the wizard before accrual plans are processed. The wizard checks the duration values before overwriting the number_of_days field, since user manually setting the amount should overwrite the calculations. task-4938695 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 automatically sets the deductibility prorata rate to 100% by default in the accounting reports. Previously, users had to manually configure this rate, which often led to inaccurate tax reports. This change simplifies the process and ensures more reliable tax reporting.
Original PR description
Users often forget to complete the deductibility prorata rate, which makes the tax report seems buggy. Set the rate to 100% by default. task-6092580 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users couldn't reliably remove formatting (bold, italic, underline) applied to inline code selections within the HTML editor. The fix ensures that formatting is properly detected and removed when users reapply shortcuts, improving the editor's usability and consistency.
Original PR description
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching…
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching `is_formattable_node_predicates` are ignored. However, when checking whether the selection is already formatted, those nodes are not ignored, so the selection is erroneously considered to be only partially formatted. Solution: Take `is_formattable_node_predicates` into account when checking whether a selection is formatted. Steps to reproduce: - Go to To-Do → Create New. - Type some text and add inline code on the same line. - Select all content using Ctrl + A. - Apply formatting such as bold, italic, or underline using keyboard shortcuts (Ctrl + B / Ctrl + I / Ctrl + U). - Press the same shortcut again to remove the formatting. - Observe that the formatting is not removed. task-6229228 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a technical issue where setting Intrastat fields on product templates without associated products would trigger an error. The fix ensures that the system handles this scenario gracefully, preventing errors and improving data integrity. This ensures accurate Intrastat reporting.
Original PR description
Problem: The Intrastat fields on product.template are computed without being stored. They are stored in product.product and the same values are used when computing the values on product.template. When trying to set the Intrastat fields on a product template without any product, an RPC error is raised without specifying the reason. Steps to reproduce: 1. Create a new product (product.template) 2. Add an attribute to the product with Variant Creation set to Dynamic, this will set no product variants (product.product) for the product template. 3. Try to set the Intrastat Commodity Code on the product template 4. Save the product template 5. Notice the RPC error raised without any explanation opw-6179705 Forward-Port-Of: odoo/enterprise#117856
This update ensures Odoo’s core systems (Trixie and Resolute) can properly handle the latest version of the lxml library, a key component for processing XML data. This change resolves a compatibility issue and improves the stability of Odoo’s XML processing capabilities. It’s a routine maintenance update.
Original PR description
Note: support for version 6+ of lxml has been merged in odoo/odoo@4b1797fccdf1447a8adb817148cc39bc322428a6 runbot-938365 Forward-Port-Of: odoo/odoo#266627
This update resolves a validation error that occurred during production recording when a subcontractor deleted and recreated a move line. The original code incorrectly invalidated the cache, leading to missing product UOM information. The fix maintains the existing logic while avoiding cache invalidation, ensuring accurate production recording.
Original PR description
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a…
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a subcontracting product with a comp A - Create and confirm a purchase order of that product (with the subcontracting partner) - Open the associated delivery - Open the move details (hamburger button) - Delete the move line linked to the comp A - Create a new move line for a comp B with a quantity of 1 - Record the production -> A validation error occurs: the mandatory field `product_uom_id` is not set. **Cause** The regression comes from this commit: https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e While assigning `move_raw_ids`, the inverse method is triggered: https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L34 At this stage, newly added lines are still virtual records (`line`): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L38 The previous implementation directly unlinked removed move lines (see commit https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L40-L43 Which will eventually flush and invalidate all the cache: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L4666 And since `line` is a virtual record (not in db), its associated values will be reset, among those, `product_uom_id`. Later, when the move line is reassigned: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L49 https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L5223-L5228 the validation fails because the virtual line no longer contains the required values. **Additional note** An alternative could have been using Command but since this line: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L42 can not be converted to: `Command.set([line.id for line in lines])` because `lines` may also contain virtual records. This causes an invalid quantity for the move. Indeed, even if the command operator would update the quantity on the `move_line` correctly, it won't for the quantity of the `move` because of its associated compute method: https://github.com/odoo/odoo/blob/26ba95ac1c5bbb24975efb1a6f53c1ab47b61532/addons/stock/models/stock_move.py#L399-L400 that relies on `.ids`, which is `[]` on virtual records. Therefore, keep the change minimal. opw-6133281
This update fixes an issue where Peppol/UBL XML files with embedded PDFs weren't automatically attached to vendor bills. The fix ensures that the PDF is correctly extracted and included as an attachment when receiving these XML files via email, improving the completeness of vendor bill data. This resolves a previous problem impacting invoice processing.
Original PR description
When receiving a Peppol/UBL XML file containing an embedded PDF via an email alias, the PDF is not extracted and attached to the resulting vendor bill. Steps to reproduce: - Set up a BE Company - Configure an incoming mail server - Set up an email alias for the Vendor Bill journal - Receive a Peppol XML with embedded PDF via alias - Check the created Bill Issue: PDF has not been extracted from the xml This occurs because the received xml is set as main attachment for the record and in this case we skip extraction opw-6075250 Forward-Port-Of: odoo/odoo#262047
This update corrects a visual issue in the Odoo POS system. Previously, a split button was always displayed, even when bill splitting was disabled. This change ensures the button is hidden when bill splitting isn't enabled, improving the user experience and maintaining a cleaner interface.
Original PR description
The Split button in the POS control panel was rendered whenever the restaurant module was active, without checking the `iface_splitbill` config flag. opw-6248177 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where manually added analytic distributions on purchase orders were lost when the line's account was changed. Now, when a purchase order line's account is modified, the associated analytic distribution remains intact, ensuring accurate tracking of costs. This prevents data inconsistencies and simplifies reporting for users managing analytic accounting.
Original PR description
__ ## Short functional explanation of the error When confirming a Purchase Order holding lines with an analytic distribution that has been manually added, and creating a vendor bill out of this PO…
__ ## Short functional explanation of the error When confirming a Purchase Order holding lines with an analytic distribution that has been manually added, and creating a vendor bill out of this PO using the Auto-Complete field. When we change the account of that line, the line loses the manually added Analytic Distribution. ## Reproduction Steps 1. Go to Accounting. Click on the tab Configuration; under the Analytic Accounting section, click on Analytic Distribution Models. 2. Create an Analytic Distribution Model for a product. 3. Go to Purchase. Create a new PO, set a Vendor and select the product you created the Analytic Distribution Model for. On the right side of the form, click on the view menu and check Analytic Distribution to make it appear. 4. Click on the Analytic Distribution of the product and add a new one; for example, select Administrative in the Departments section. 5. Confirm order. 6. Go to Accounting and click on the Vendors tab > Bills. Create a new bill, and in the field Auto-Complete, select the PO you just created. 7. Change the account of the line. ### Expected behavior Only the account should be changed on the line. ### Unexpected behavior The manually added Analytic Distribution has disappeared. ## Origin of the issue When we change the `account_id` field, the compute method `_compute_analytic_distribution` is triggered. This method retrieves the related distributions of the line: https://github.com/odoo/odoo/blob/af32885ec5f07d492f3b8e8fff1785996a739f72/addons/account/models/account_move_line.py#L1154 which, in the context of Purchase, calls this method: https://github.com/odoo/odoo/blob/af32885ec5f07d492f3b8e8fff1785996a739f72/addons/purchase/models/account_invoice.py#L540-L545 We retrieve the distribution of the related line using `self.purchase_line_id.analytic_distribution`. However, this code isn't triggered when the move line has an analytic distribution, even though the related line `purchase_line_id` might have one! Therefore, we need to execute that code whether or not our move line has an analytic distribution. Note: the same behavior is to avoid when creating invoices for quotations. __ opw-6062466
This update resolves an issue where the PL VAT reporting XML (FA3) was incorrectly omitting a key date field. The fix ensures the system accurately compares the invoice issue date with the delivery date, aligning with Polish tax regulations. This prevents errors in VAT reporting and ensures compliance.
Original PR description
**Steps to reproduce** 1. Create a customer invoice with Invoice Date `2025-05-27` and accounting Date `2026-05-04`. 2. On the *Other Info* tab, set the Delivery Date to `2026-05-04` and post the…
**Steps to reproduce** 1. Create a customer invoice with Invoice Date `2025-05-27` and accounting Date `2026-05-04`. 2. On the *Other Info* tab, set the Delivery Date to `2026-05-04` and post the invoice. 3. Generate the FA(3) XML. **Issue** `P_6` is omitted from the payload even though the delivery date differs from the invoice issue date. The FA(3) information sheet (Warsaw, September 2025, binding from 1 February 2026) defines `P_6` as *"the date of delivery [...] if such date is specified and differs from the date of issue of the invoice"*, where the date of issue is `P_1` (Art. 106e sec. 1 item 1 of the VAT Act). In Odoo `P_1` maps to `invoice_date`, but the template at https://github.com/odoo/odoo/blob/4890b8021af2a5c025944220043d295bb7bbbb9b/addons/l10n_pl_edi/data/fa3_template.xml#L132 compares `delivery_date` against `invoice.date`, the accounting/entry date. When the invoice is posted on the delivery day the accounting date equals the delivery date, the guard evaluates to false, and `P_6` is wrongly dropped. Comparing against `invoice.invoice_date` aligns the guard with `P_1` as the spec requires. Ticket [link](https://www.odoo.com/odoo/project.task/6211119) opw-6211119
This update resolves an issue where Odoo failed to import simplified Italian electronic invoices (TD08) when a line item consisted entirely of taxes. The fix prevents a division-by-zero error, ensuring that valid tax-only invoices submitted by the Italian tax authority (Agenzia delle Entrate) can now be successfully imported. This improves the reliability of invoice processing for Italian businesses.
Original PR description
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes…
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes (where the total line amount equals the tax amount). ### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Switch to IT company 3. Go to Vendors > Refunds 4. Try to import the xml from the ticket ### Cause of the issue: The XML parser attempts to dynamically calculate the tax percentage using the formula tax_amount / (amount - tax_amount). When a line is purely a tax adjustment, the taxable base (amount - tax_amount) evaluates to exactly zero, triggering the critical division by zero crash. https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/l10n_it_edi/models/account_move.py#L1863-L1867 ### Reason to introduce the fix: To ensure Odoo successfully imports valid, tax-only EDI documents already accepted by the Agenzia delle Entrate. Ticket [link](https://www.odoo.com/odoo/project.task/6217373) opw-6217373 Forward-Port-Of: odoo/odoo#266374