Friday, May 8, 2026
37 changes · saas-19.1
Resolved issues and error corrections
This update resolves a problem preventing the demo data for the MRP Subcontracting module from loading correctly in Odoo 19. The fix ensures that the correct product template record is used, which was previously mismatched, causing an error. This ensures demo data loads properly for testing and training.
Original PR description
Steps to reproduce: - Initialize an empty database with demo data enabled - Install mrp_subcontracting Problem: The product.product `product_delivery_02` record does not share the same #ID as the product.template `product_delivery_02_product_template` record. This leads to an error when loading the demo data. This errors only started with Odoo v19. Solution: Use the right product.template `product_delivery_02_product_template` record. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262949
This update resolves an issue where users could incorrectly add multiple companies to 'Bank and Cash' accounts, leading to validation errors. The fix ensures accurate company tracking by clearing outdated data and forcing a fresh database check.
Original PR description
Steps to reproduce: - Install `l10n_dk` module - Create the test branches under the `DK Company` - Add both companies(parent and branch) in `Bank and Cash` account - Go to Chart of Accounts and try…
Steps to reproduce:
- Install `l10n_dk` module
- Create the test branches under the `DK Company`
- Add both companies(parent and branch) in `Bank and Cash` account
- Go to Chart of Accounts and try to delete any account
Cause:
This error occurs because users can add multiple companies to a `Bank and Cash` account, although it should be prevented by the `_check_company_consistency` [constrain]. However, the code still allows it because, in this [commit], `depends_context=('uid',)` was set on the `company_ids` field to keep separate sudo/non-sudo caches for the field. As a result, during the validation [check], the user may still have stale cached values, causing the system to detect only a single company.
Solution:
Here, we first clear all cached values for the old record and force the ORM to re-fetch the values from the database, ensuring an updated recordset. So, the validation error is raised when saving multiple companies.
[constrain]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[check]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[commit]: https://github.com/odoo/odoo/pull/220294/changes/5096d083a38968425920aa5bf466b156eebb3dc7
Ticket [link](https://www.odoo.com/odoo/project.task/6125840)
opw-6125840
Forward-Port-Of: odoo/odoo#263246
Forward-Port-Of: odoo/odoo#260261This update resolves a visual bug where the "Add to Cart" button appeared squeezed on product pages when in edit mode with specific image and purchase style settings. The fix prevents a click event from being triggered when the spacebar is pressed, ensuring the button's correct size and functionality.
Original PR description
This code fixes a bug related to the size of the “Add to Cart” button. To reproduce the bug, you need to be on a product page in edit mode. In this mode, you must set the Image Area to 33 and the purchase style to Large. You will see that the “Add to Cart” button is squeezed. The bug occurs because, in edit mode, a new span container is added around the button to indicate that it can be edited. The purpose of the span was to prevent a click event from being triggered when pressing the space key. The fix removes this span and adds a listener to capture space key presses, allowing a real space character to be inserted instead of triggering a click. find-when-working-on-task-6147939 **Before** <img width="1918" height="552" alt="before" src="https://github.com/user-attachments/assets/1ef6e793-45d4-4c6b-ab2b-cdd4ace5381f" /> **After** <img width="1913" height="1054" alt="after" src="https://github.com/user-attachments/assets/b611834e-3414-4b37-af9e-c0942c6cb05b" />
This update fixes an issue where enabling Employee Login in POS and leaving the ‘Basic rights’ field empty prevented other employees from logging in. Now, all company employees can access the POS login screen, aligning with the intended functionality of allowing basic cashiers to log in regardless of configured advanced rights.
Original PR description
With Employee Login enabled in POS, leaving the “Basic rights” field empty is meant to allow all employees to log in as basic cashiers. In v19, configuring at least one Advanced/Minimal employee…
With Employee Login enabled in POS, leaving the “Basic rights” field empty is meant to allow all employees to log in as basic cashiers. In v19, configuring at least one Advanced/Minimal employee while keeping “Basic rights” empty incorrectly restricted the login list to only the explicitly configured employees (and the linked backend user), so other employees could no longer sign in. Steps to reproduce: ------------------- * Go to POS settings and enable Employee Login. * Add at least one employee in Advanced rights. * Leave Basic rights empty. * Open POS login. > Observation: Only Advanced can sign in. Other employees are missing. Why the fix: ------------ The employee loading domain must only become restrictive when Basic rights is explicitly set. If Basic rights is empty, all company employees should remain selectable, and Advanced/Minimal should only affect roles, not visibility. Align with 19.1 behavior/state of code. opw-6170066 Forward-Port-Of: odoo/odoo#263100 Forward-Port-Of: odoo/odoo#261939
This update corrects a minor error in the automated tests for our Point of Sale (POS) system. A typo was identified in the test assertions, which was causing intermittent failures. The fix ensures the tests run reliably and accurately reflect the POS order flow.
Original PR description
Correct a typo in `test_01_order_flow` assertions. `pdis_order1` was reassigned multiple times; the second assertion should use `pdis_order2`. Task-6065459 Forward-Port-Of: odoo/enterprise#116424 Forward-Port-Of: odoo/enterprise#111917
This update resolves a technical issue that was causing a test to fail in our self-order system. The fix ensures that all time slots are generated for the current day, preventing errors related to time-dependent testing. This improves the reliability of the self-order process.
Original PR description
Before this commit: = - The test test_slot_limit_orders created slots only for the first day of the week (Monday). - The test scenario includes a slot at "18:00". - On Mondays, the test fails between 18:01 and 23:59 because the "18:00" slot no longer exists for the current day. - On other days, the test passes since slots are generated for the upcoming Monday. After this commit: = - Freezed the time to current day at "00:00" so that slot list can have every slot for that day. task-6043739 runbot-241836 Forward-Port-Of: odoo/odoo#254775
This update resolves an issue where DIAN XML files of type 'AttachedDocument' were not being imported correctly, resulting in lost data. The fix ensures the system correctly identifies and processes these files, aligning with DIAN documentation requirements for invoice structure.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update fixes a visual inconsistency in the Point of Sale interface. The styling of product and combo product cards has been unified, creating a more consistent and professional look across the product screen and combo configuration popup. This improves the overall user experience for sales staff.
Original PR description
In this commit: --- - Applied the same background styling to combo items as normal product cards. - Ensured visual consistency between product cards on the product screen and in combo configuration popup. | Before | After | | -------- | -------- | | <img width="979" height="447" alt="image" src="https://github.com/user-attachments/assets/6d91e1d7-99d5-47c4-a1bf-6604765d08d5" /> | <img width="979" height="453" alt="image" src="https://github.com/user-attachments/assets/602c9a8f-9e56-4633-84bf-0710cb5debab" /> | task-6103260 Forward-Port-Of: odoo/enterprise#113159
This update resolves an issue where the 'Reconcile' button on the bank statement dialog wouldn't work correctly on smaller screens (like mobile devices). The fix ensures the correct data is passed to the dialog component, preventing a validation error. This improves usability for users accessing the system on mobile.
Original PR description
When clicking on the "Reconcile" button of a bank statement line on a small screen (ex: mobile) threw an OwlError "Invalid props for component 'KanbanController': unknown key 'bankRecInfo'". BankRecSelectCreateDialog injected `bankRecInfo` into `baseViewProps`, which is spread into the embedded view regardless of its type. On desktop the embedded view is a list (patched to accept `bankRecInfo`), but on small screens SelectCreateDialog falls back to a kanban view, whose controller does not declare that prop, triggering Owl's props validation. Only forward `bankRecInfo` when the inner view is a list by overriding `viewProps` instead of mutating `baseViewProps`. Steps to reproduce: - Enable the developer mode. - Open Bank Reconciliation. - Resize the window to a small/mobile width (or open from a mobile device). - On a statement line, click the "Reconcile" button to open the dialog. - OwlError is thrown opw-6070573 Forward-Port-Of: odoo/enterprise#114298
This update resolves a problem where invoices weren't correctly processing extra components within kit products when using automatic accounting. Specifically, the system was misinterpreting the unit of measure, leading to invoicing errors. This change ensures accurate invoicing for kit products with multiple components.
Original PR description
### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261878
Forward-Port-Of: odoo/odoo#258141This update resolves a crash issue that occurred when creating Point of Sale (POS) orders with the pos_avatax module installed. The fix restores a previous method to correctly identify the customer's shipping information, ensuring POS order creation remains stable. This improves the reliability of our POS functionality.
Original PR description
Before this commit, when pos_avatax was installed, creating a pos order could crash because the pos order does not have the partner_shipping_id field. This commit re-adds the _get_avatax_ship_to_partner method as it was before the refactor https://github.com/odoo/enterprise/commit/0404086db567ee0595414263d36a3b7dceaa0dbe, which returns the partner_id for the pos order. The `_get_avatax_ship_to_partner` is overridden in `pos_avatax`. Since a `pos.order` does not have a `partner_shipping_id`, the overridden function only reads the partner_id. opw-6122280 Forward-Port-Of: odoo/enterprise#115840
This update resolves an issue where users couldn't reliably edit text within editable buttons in the website builder. The fix involves a change in how the button's content is handled, preventing duplication of branding when copying and pasting. This ensures a smoother and more predictable editing experience for website customization.
Original PR description
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to…
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to copy website builder's branding attributes (which causes issues when pasted). This commit adds a span inside the button instead of outside, and removes it before saving the content. Steps to reproduce: - Open website buider on `/product/item-1` - Place the cursor in the "Add to cart" button - Press left arrow, repeat until out of the button - Bug: You can write text there, but it won't be saved ##### - Open website buider on `/product/item-1` - Select some text in the "Add to cart" button - Copy (`ctrl+c`) - Paste (`ctrl+v`) - Bug: Some content seems duplicated: the branding of the savable button has been duplicated inside it and the automatic replication between identical fields is based on this branding, thus replicates the button's content inside it Similar issue about copy+pasted branding: ec93d48ab17b4a72f61fa358e5a81d2abcb18897
This update corrects a bug where the Point of Sale dashboard incorrectly displayed the default warehouse, even when a specific POS location was configured with a different warehouse and operation type. The fix ensures that POS locations accurately reflect their assigned warehouse, improving inventory management and reporting.
Original PR description
When filtering pos by warehouse_id, all pos are under the same warehouse even if we had configure an Operation Type from a different warehouse for a specific pos. Steps to reproduce: ------------------- * Setup a second warehouse in the company * Add the new POS operation type picking for the second warehouse on the POS settings * Group by warehouse in the POS dashboard > Observation: It always shows the first warehouse Why the fix: ------------ The warehouse_id field on pos.config was a plain Many2one with a static default that always set it to the first warehouse of the company. Convert warehouse_id into a computed stored editable field that derives from picking_type_id.warehouse_id. This ensures the warehouse stays in sync when the operation type changes, while still allowing manual override for the Ship Later feature. opw-6104652 Forward-Port-Of: odoo/odoo#262821 Forward-Port-Of: odoo/odoo#258830
This update resolves an issue where internal transfers using multi-step routes were incorrectly flagging a missing delivery carrier. The fix ensures that carrier validation is skipped for internal movements, streamlining the process and preventing unnecessary errors. This improves the efficiency of internal stock transfers within the RO company.
Original PR description
### Issue: With `l10n_ro_edi_stock_batch`, internal transfers using multi-step routes were requiring a delivery carrier This makes no sense for internal moves ### Cause: The method…
### Issue: With `l10n_ro_edi_stock_batch`, internal transfers using multi-step routes were requiring a delivery carrier This makes no sense for internal moves ### Cause: The method `_compute_l10n_ro_edi_stock_enable` was overridden to check for `not picking.batch_id` However, for multi-step delivery routes, internal pickings still triggered the carrier validation, as no check on the `picking_type` was performed ### Steps to reproduce: - Install `l10n_ro_edi_stock_batch` with demo data and switch to RO Company - In Settings, enable `Multi-Step Routes` - Set the RO Warehouse's Outgoing Shipments to `Pick then Deliver (2 steps)` - Create a Product (e.g. RO product) - Create a Delivery Method (e.g. RO Delivery, Partner: Any, Delivery Product: RO Product) - Create and Confirm a Sale Order for the RO Product - From the Sale Order, click Delivery and validate the picking ### Before the fix, internal transfers raised: `The picking RO Co/PICK/00001 is missing a delivery carrier.` enterprise-PR: https://github.com/odoo/enterprise/pull/114166 opw-5925087 Forward-Port-Of: odoo/odoo#263036 Forward-Port-Of: odoo/odoo#257293
This update resolves an issue preventing users from modifying warehouse routes in the Romanian (RO) version of Odoo. The fix addresses a bug where an error occurred when changing routes, blocking modifications. This ensures that users can correctly manage incoming and outgoing shipments within their warehouses.
Original PR description
### Issue: When changing the routes of a Romanian warehouse, an error is raised, blocking any modification of multi-step routes ### Cause: The code attempts to access `in_type_id` from `warehouse_data` However, when updating routes, `warehouse_data` is empty in the method `_create_or_update_sequences_and_picking_types` This leads to a crash because the code assumes that `warehouse_data` always contains `in_type_id` and `out_type_id` Additionally, even if the data were present, it would result in creating duplicate `stock.picking.type` records ### Steps to reproduce: - Install `l10n_ro_saft_stock` with demo data and switch to `RO Company` - Enable `Multi-steps Routes` in Settings - Try to modify Incoming or Outgoing Shipments on a warehouse - When saving, the following error is raised: "Oh snap! in_type_id" odoo-pr: https://github.com/odoo/odoo/pull/257293 opw-5925087 Forward-Port-Of: odoo/enterprise#114166
This update fixes issues with the WPS report generated for payroll in Saudi Arabia. Specifically, it now requires the Saudi National ID, simplifies bank field handling, and ensures correct mapping of bank details for employees outside of KSA. These changes improve the accuracy and reliability of the WPS file submission.
Original PR description
this commit includes the following fixes for the WPS report in SA: - Make the Saudi National / IQAMA ID required for generating the WPS file. - Remove the condition on the field [57 - BANK] and have it always filled if the SARIE code is set. - If the employee bank account is from a different country (other than KSA or null), map the field [57 - BANK] to the swift code. task-6144299 Forward-Port-Of: odoo/enterprise#116419
This update fixes a bug in the HTML editor that prevented the cursor from correctly positioning within newly created code blocks. Previously, the editor created an invisible text node during shortcut extraction, which was then removed during code block conversion. Now, the editor directly deletes the selection, eliminating this issue and ensuring the cursor moves correctly.
Original PR description
#### Description of the issue this PR addresses: - In shortcut plugin, extractContent leaves an empty text node at block start - When converting to a code block, that invisible node is removed, so the editor cannot restore the cursor correctly #### Desired behavior after PR is merged: - Delete the selection directly instead of extracting text - This prevents creating the invisible empty node #### Steps to reproduce: - Type `1. ` to create a list - Immediately insert `/code` - Cursor does not move inside the code block task-6169180 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261799
This update resolves issues preventing order validation and report downloads within the l10n_co_edi_pos module. The fix addresses a problem where data was being incorrectly formatted during export, leading to errors. This ensures reliable POS data generation for DIAN compliance.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
This update resolves an issue in the LDAP authentication unit test that was causing temporary data inconsistencies. Switching to an `HttpCase` simplified the test and ensures accurate results. The test is being revived to accommodate a new bug fix, improving the stability of the authentication process.
Original PR description
The unit test is tagged `-standard` and `database_breaking` because it was leaving left overs in the database. Using an `HttpCase` over a `BaseCase` solves that issue in addition to make the code way simpler. We want to resurrect this unit test class because we plan to add another unit test in that class for a bug fix. Forward-Port-Of: odoo/odoo#262288 Forward-Port-Of: odoo/odoo#261743
This update addresses a bug where the mobile app would unexpectedly log users out due to session rotation occurring during certain requests, like attachments downloads via a webview. A new header allows the mobile app to temporarily bypass session rotation for specific requests, ensuring a smoother user experience. This fix doesn't introduce any security risks.
Original PR description
The session id rotates softly every 3 hours For some features, the mobile app sometimes does requests "outside" of the mobile app, through a webview for instance, and if the session rotation interval…
The session id rotates softly every 3 hours For some features, the mobile app sometimes does requests "outside" of the mobile app, through a webview for instance, and if the session rotation interval is reached at that moment, it rotates the session and the `set-cookie` instruction setting the new session cookie is received by the webview only, it's not propagated back to the mobile app. Then, this could lead for the user to be logged out of the mobile app if the soft automatic session rotation happens at the very unfortunate moment the request through that webview happens. For instance, the mobile app uses a webview to download attachments. If the session rotation happened during that request, the mobile app doesn't receive the `set-cookie` header and doesn't receive the new session id, leading for the user to be logged out of the mobile app. This revision aims to provide an option for the mobile app to temporary skip the session rotation for a specific request, such as the requests done through the webview during downloads. This option to be able to disable the rotation is not a security threat: If an attacker passes that header to disable the interval session rotation, he would avoid the session to be changed every 3 hours, but if he wouldn't he would still receive the new session id every 3 hours. The session rotation is for legitimate user / computer to rotate their session every 3 hours so that in case of data leak of their browser cookies, there is a chance the session cookie is already no longer valid when published on the public web. Legitimate users have no benefit using this option header to disable the rotation. Forward-Port-Of: odoo/odoo#263325
This update resolves a problem where long text fields in the 'Sign' document template would render incorrectly, causing text to overflow and appear as a single line in the final PDF. The fix ensures that text, including long names and continuous text, is properly wrapped within the designated fields, improving the appearance and readability of signed documents.
Original PR description
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact…
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact name value - Click 'Sign Now' and put the new contact as the signer - Sign and download > The text appears as a single extended line exceeding field/page boundaries ### Cause of Issue: The textarea and stamp field rendering only handled explicit newline characters (`\n`) and did not account for text that exceeded the field width. https://github.com/odoo/enterprise/blob/017743cbe97b629e9d9f1895b655014d4c3abbcb/sign/models/sign_document.py#L330-L345 When the HTML preview showed wrapped text, the PDF output rendered it as a single line. For continuous text without spaces, the text would overflow the field boundaries entirely. ### Fix: Accounted for long texts that have spaces and long words to show all the information in the PDF opw-6045062 Forward-Port-Of: odoo/enterprise#114813
This update fixes a display issue in push notifications for inbox users. Previously, notifications contained escaped characters, resulting in a broken message. Now, users receive the full, correctly formatted notification content, ensuring a better user experience.
Original PR description
**Steps to reproduce:** Log in as admin and ensure notifications are handled in Odoo. Enable push notifications and the 'Task Created' subtype for a project. As a second user, create a new task in…
**Steps to reproduce:** Log in as admin and ensure notifications are handled in Odoo. Enable push notifications and the 'Task Created' subtype for a project. As a second user, create a new task in that project. **Current behavior before PR:** admin received escaped content in the push notification (e.g., `A new task has been created in the "Project Name" project`) **Cause:** For inbox users, we send a client-side push notification using `previewText` as the body. This field returns a markup object containing escaped characters, which are converted to a string when passed to the notification body. Since the notification body only accepts plain text, these characters are displayed literally to the user. **Desired behavior after PR is merged:** admin receives the unescaped content in the push notification. (e.g., `A new task has been created in the "Project Name" project`) task-5112810 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263187 Forward-Port-Of: odoo/odoo#240331
This update fixes an issue where automatically selected courses for multi-category restaurant items always chose the lowest sequence, regardless of the currently selected category. Now, the system correctly picks the course linked to the active category filter, ensuring accurate order processing. Additionally, a new setting allows for more efficient course allocation when adding items to existing orders.
Original PR description
When a product belongs to multiple categories, each linked to a different course, the automatic course selection was always picking the one with the lowest sequence, regardless of context. The expected behavior is to pick the course tied to the currently active category filter, not an arbitrary one. This commit implements that logic. In addition, when `use_course_allocation` is enabled, adding a first course to an order that already contains products no longer creates an extra course. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6187108
This update resolves an issue where users couldn't edit documents after removing their ownership, even with editor permissions. The fix allows editing from the company folder and enables users to correct incorrect document ownership, improving document management flexibility. It also allows moving non-folder documents from the company root.
Original PR description
How to reproduce: - Login as Marc Demo (not as admin) - Upload a document at the root of "My Drive" - Remove the owner of this document The document is no longer editable in the details view panel while the user has been added as editor. To solve the problem, we change the readonly condition in the detail panel to allow edition in the company folder also (even if not a manager). We also change the following: - we allow to move non folder document from company root folder (user_can_move) while the "protection" was applied also to non folder before. - we change the condition to update the owner. Now when there is no owner, a user with edit permission can change it. This allows to correct a wrong manipulation. Task-5881531 Forward-Port-Of: odoo/enterprise#106192
This update fixes an issue where refund payments were incorrectly routing funds to the wrong accounts. The change ensures that inbound and outbound payments use the same accounts, resulting in accurate journal entries for both refunds and regular transactions. This improves financial reporting accuracy.
Original PR description
Step to reproduce: - we need a session, where in total, we gave out money (when we refund) - for this, start a pos session, do a order, pay using bank and close session - restart the pos, refund the order, and pay using bank, close it. - go to accounting > customer > payment - open payment for both session Observation: - in journal entries for both payment, amount is credit into `account_receivable` and debit from `outstanding account` Cause: - commit[1] swaps accounts when we have outbound payments, which is functionally incorrect and lead to this issue. [1] https://github.com/odoo/odoo/commit/844d2960af6b2cdd8620eb1681bda03dd48a97e4 Fix: - do not swap accounts between `outstanding` and `destination` accounts. Expected after fix: - Inbound and outbound payments use the same accounts - Journal entries are correct: - Inbound: debit outstanding, credit account_receivable - Outbound: reverse of inbound entries opw-6044883 Forward-Port-Of: odoo/odoo#256258
This update resolves an issue where payment reminders wouldn't display correctly when the 'Payment' module wasn't installed. The fix ensures the system checks for the necessary 'payment.method' model before attempting to use it, preventing template rendering errors. This ensures payment reminders function properly regardless of the installed modules.
Original PR description
Repro steps: 1. Initialize a new DB 2. Install account_followup module without payment module 3. Go to Email templates > Payment reminder 4. Click on Preview You will get an error Failed to render QWeb template for Mail Template: 'Payment Reminder' (ID: 9) Target Model: res.partner Language context: en_US Error: Error while render the template KeyError: 'payment.method' Root cause: The method `_show_pay_now_button` that was being called in the template email_template_followup_1 was using self.env['payment.method'] even tho payment module is not a dependency of account_followup Fix: The introduced fix ensures that 'payment.method' model exists before attempting to use it build_error-243030 Forward-Port-Of: odoo/enterprise#116673 Forward-Port-Of: odoo/enterprise#116079
This update resolves a technical problem that prevented users from correctly booking appointments with multiple seats and capacity limits when scheduling was set to 'flexible'. The fix ensures that the booking system accurately handles these complex appointment types, improving the overall user experience.
Original PR description
### Steps to reproduce: - Download "Appointment" and "Website" - Configure an appointment to be booked by resource with multiple seats and manage capacity - Set the schedule to be flexible and configure valid time slots - Go to the booking page and select the number of participants > Traceback: cannot unpack non-iterable bool object ### Cause of Issue: The `_get_appointment_slots` method unpacks the `appointment_slots_force_month` directly: https://github.com/odoo/enterprise/blob/4ca3dddaeadeb6c937d555cc4da8fb4bb61fea35/appointment/models/appointment_type.py#L871 Since the `appointment_slots_force_month` value was explicitly set to `False` in https://github.com/odoo/enterprise/blob/4ca3dddaeadeb6c937d555cc4da8fb4bb61fea35/appointment/controllers/appointment.py#L1063-L1070 the unpacking operation failed because it tried to unpack a boolean instead of a tuple. opw-6197653 Forward-Port-Of: odoo/enterprise#116613
This update ensures the 'Back on X' message for employees on holiday is now consistently displayed in both the standard and compact versions of the discussion sidebar. Previously, this information was only visible in the larger sidebar view. This enhancement provides a more complete and user-friendly experience for viewing team availability.
Original PR description
Before this commit, the "Back on X" text below chats of people that are away was only displayed in non-compact sidebar. This comes from `xpath` that targets only the non-compact sidebar. This commit fixes the issue by adding the `xpath` for the compact sidebar. Task-6197362 Before / After <img width="247" height="254" alt="before" src="https://github.com/user-attachments/assets/da149668-7649-479a-baca-c3df9f6600b6" /> <img width="240" height="279" alt="after" src="https://github.com/user-attachments/assets/072405d1-b050-4314-933f-31f1c1c30ad4" /> Forward-Port-Of: odoo/odoo#263071
This update corrects a bug in how tax reports calculate balances. Previously, a new tax tag would incorrectly include a leading dash, causing reports to always show a zero balance. Now, the system correctly handles new tax tags, ensuring accurate reporting of tax amounts.
Original PR description
When writing a new formula on a tax_tags expression, if the tag is not shared by other expressions, the tag should be renamed accordingly. Before this commit, when the new formula started with a '-' sign, the tag ended up with that same '-' at the beginning of its name. This was wrong: from 19.0 on, a tax tags formula starting with '-' means we want to negate the balance of the move lines having that tag. Because of that, when computing the report, the expression would look for a tag without the '-' in its name, not find it and essentially always compute a result of 0. Forward-Port-Of: odoo/odoo#262059
This update corrects a misleading validation error that appeared when using the translation button on Sale Order Templates, particularly within O2M views. The fix ensures the system correctly handles nested records, preventing unnecessary error messages and improving the user experience. This change ensures users can accurately translate product descriptions without confusion.
Original PR description
Steps to reproduce: * Enable multiple languages * Go to Sale Order Templates and create a new template * Add a product line, then click the translate button on the description field * A confusing…
Steps to reproduce: * Enable multiple languages * Go to Sale Order Templates and create a new template * Add a product line, then click the translate button on the description field * A confusing validation error appears for missing `sale_order_template_id` Issue: * Instead of highlighting the missing required fields on the sale order template form view, it raises a misleading validation error on `sale_order_template_id` Cause: * `useTranslationDialog` always attempts to save the passed record directly. In O2M list views, the field can belong to a nested relational record, so the correct behavior is to save the root record instead. Affected Version: 17.0 Before: <img width="1919" height="1014" alt="image" src="https://github.com/user-attachments/assets/cd61381d-289a-4df4-bdf2-7881fa851939" /> After: <img width="1920" height="887" alt="image" src="https://github.com/user-attachments/assets/5218c74b-c024-4994-b816-cb7ae69b420f" /> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262988 Forward-Port-Of: odoo/odoo#262755
This update resolves an issue where the barcode scanning interface incorrectly displayed duplicate serial numbers after a user navigated back to the picking view. The fix ensures that only the correct serial number is shown, preventing data inconsistencies and improving the user experience. This was achieved by delaying a process to ensure data is properly updated.
Original PR description
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode…
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode interface without validating the picking, both serial numbers show up on the picking view. However, the first serial number’s `stock.move.line` was deleted, so only one serial number should be there. When exiting the barcode interface a call to `post_barcode_process` is made, where the extra `stock.move.line` is deleted, but it doesn’t wait for the call to finish. https://github.com/odoo/enterprise/blob/d5a52cb79c9c41d792685d2858cfeb6aee147642/stock_barcode/static/src/models/barcode_picking_model.js#L1896 Purpose: By overriding `beforeQuit` to add the `_onExit` call, the component now waits for the `post_barcode_process` call to finish before navigating back to the picking view. This helps ensure the UI displays the updated data. Steps to reproduce on Runbot: Create a product tracked by serial numbers. Have 2 units on hand: serial 001 with a package, and serial 002 without a package. (This is needed so the barcode app will create a new line). Create a delivery for 1 unit of our test product and mark it as todo. Ensure that serial 001 is reserved. Click the Barcode smart button and scan the barcode for serial 002. Click the back button. Observe that both serial numbers are shown on the picking. Refresh the page and observe only serial 002 is now shown. opw-6105740 Forward-Port-Of: odoo/enterprise#115491
This update ensures that livechat conversations are automatically marked as read when they end, resolving a previous issue where agents saw persistent unread indicators. The change adjusts how the system focuses the chat window to trigger the read state, improving the agent experience and ensuring conversations are properly tracked.
Original PR description
**Description of the issue this PR addresses:** Previously, when a livechat conversation ended, it was never automatically marked as read. The existing `mark_as_read` mechanism depends on the composer being focused, but ended livechat conversations hides the composer, and the chat window does not focus the thread automatically (focus only happens on explicit click). This made it impossible for the read state to be triggered through the normal path, leaving agents with persistent unread indicators on closed livechat conversations. **Desired behavior after PR is merged:** - Focus the composer when present. - Focus the conversation otherwise. This ensures the read state is correctly triggered when the conversation is effectively in focus. task-[5900038](https://www.odoo.com/odoo/project/1519/tasks/5900038) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253609
This update fixes inaccuracies in how the Mexican employment subsidy was calculated, specifically addressing issues with threshold prorating and monthly cap enforcement. The changes ensure employees receive the correct subsidy amounts based on their salary, aligning with government regulations and preventing overpayments.
Original PR description
The employment subsidy calculation was incorrect in two main scenarios: ### 1. Incorrect threshold prorating: The system was comparing the salary against the full monthly limit even for partial…
The employment subsidy calculation was incorrect in two main scenarios:
### 1. Incorrect threshold prorating:
The system was comparing the salary against the full monthly limit even for partial periods (weekly or bi-weekly). This resulted in employees wrongly receiving the subsidy when their proportional salary actually exceeded the limit.
Example: In 2026, the 14-day threshold should be 5,292.67 (11,492.66 / 30.4 * 14). Currently, an employee earning 10,000.00 in those 14 days still gets the subsidy because it's being compared against the full 11,492.66.
### 2. Cumulative monthly cap:
When multiple payslips occur in the same month, the total subsidy sometimes exceeds the statutory monthly maximum (536.22 for 2026) because the cap wasn't enforced across all slips.
Example: The 2026 maximum monthly subsidy is 536.22. In a month with three partial payslips:
- Mar 1st - Mar 14th: The system grants 246.68.
- Mar 15th - Mar 28th: The system grants 246.68.
- Mar 29th - Apr 11th: For the 3 days belonging to March, the system grants an additional 52.86.
Total subsidy for March reaches 546.22, exceeding the legal cap.
### Changes included in this PR:
- Updated `l10n_mx_rule_parameter_uma` to include monthly and annual values. This prevents rounding discrepancies.
Example: the 2026 annual UMA published is 42,794.64. In a rule the calculation is: l10n_mx_uma * 30.4 * 12 = 117.31 * 30.4 * 12 = 42,794.68 resulting in a ~0.04 difference.
- Create a new rule parameter `l10n_mx_rule_parameter_subsidy_salary_limit` to have the subsidy eligible threshold. Starting in 2026, the government's rounding changed from zero decimals(e.g., 9,081.00 in 2024, 10,171.00 in 2025) to two decimals (11,492.66). Storing these as explicit parameters avoids the precision errors.
- Added comprehensive unit tests covering:
- Complete periods: validates standard payslips aligned with the month calendar (bi-monthly, monthly, bi-weekly).
- Overlapping periods: validates split-month scenarios (14-day, 10-day, weekly) where periods cross month boundaries:
Example of self._overlapping_period("weekly", 7, 2646.33, (35.24, 88.10), (3, 123.34), (77.53, 35.24))
This test covers 5 weekly payslips with the following subsidy
distribution:
- Tuple `first_payslip` => (35.24, 88.10) means that:
First payslip (Apr 29 - May 5), the subsidy is 35.24 for April and 88.10 for May.
- Tuple `mid_payslips` => (3, 123.34) means that:
For the next 3 payslips fully in May, the subsidy is 123.34 each.
Payslip 2 (May 6 - May 12): Subsidy for May = 123.34
Payslip 3 (May 13 - May 19): Subsidy for May = 123.34
Payslip 4 (May 20 - May 26): Subsidy for May = 123.34
- Tuple `last_payslip` => (77.53, 35.24) means that:
Last payslip (May 27 - June 2), the subsidy is 77.53 for May and 35.24 for June.
- Across years: subsidy amounts and limits are updated annually.
Therefore, if a period overlaps two years, a salary amount might be eligible for a subsidy in January but not in the previous December, and the paid subsidy is increased in January due to the new limits.
- Cleaned up redundant tests (test_regular_payslip_subsidy) and adjusted decimal precision.
- For split-month `schedule_pay` periods, the first payslip might generate a subsidy. However, in subsequent payslips, due to commissions or a wage increase, the employee may exceed the monthly subsidy salary limit.
In those payslips, a warning is shown to notify the user that a manual adjustment is required.
Created tests to validate these cases.
target: 19.0
task-5419659
Forward-Port-Of: odoo/enterprise#107601This update fixes an issue where subscription delivery dates were incorrectly displayed as the previous day due to timezone differences. The fix ensures delivery dates are accurately calculated based on the company's timezone, resolving a potential scheduling problem for subscription orders. This improves the reliability of delivery planning.
Original PR description
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm…
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm it. 3. Open the generated delivery order and check its Scheduled Date. Issue The scheduled date on the first delivery renders as the previous day. `_prepare_procurement_values` writes `date_planned` as `current_period_start`, which is a plain `fields.Date` value (https://github.com/odoo/enterprise/blob/ba41d7de3c0474286e3e9319710fdacfb95d3e2c/sale_subscription_stock/models/sale_order_line.py#L156). When a `date` is stored in the `Datetime` column `stock.move.date`, Odoo anchors it at midnight UTC; in any negative-offset timezone this renders as the previous day (e.g. `2022-03-02 00:00 UTC` shows as `2022-03-01 21:00` in UTC-3). The non-subscription path does not hit this because it resolves `date_planned` through `_expected_date()`, which returns `order_id.date_order` — a full `Datetime` set to `fields.Datetime.now()` at confirmation (https://github.com/odoo/odoo/blob/996702b0d5c518db2ac6f0b144e7835b27c29736/addons/sale/models/sale_order_line.py#L1398). The same midnight-UTC drift also affects later recurrences, where `current_period_start` falls back to `last_invoice_date` — another `Date`. Solution Split the two cases explicitly: - First delivery (`last_invoice_date` unset): set `date_planned` to `order_id.date_order`, matching the non-subscription flow. - Subsequent deliveries: localize `last_invoice_date` at `00:00` in the company timezone before converting back to UTC, reusing the pattern already applied to reordering rules (https://github.com/odoo/odoo/blob/20a0eee2d03293564320c268252a0353781d99ea/addons/stock/models/stock_orderpoint.py#L722). opw-6133831 Forward-Port-Of: odoo/enterprise#116362 Forward-Port-Of: odoo/enterprise#115100
This update fixes an issue where Peppol invoices were incorrectly sending data from branch companies instead of the parent company. The change ensures invoices accurately reflect the parent company's information in the UBL/CII XML file, improving compliance with Peppol standards and avoiding potential errors in data exchange.
Original PR description
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue:…
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue: 1. Download Accounting, Contacts and l10n_be 2. Create a branch for a Belgium company 3. Enable Peppol sending on the parent company 4. Enable Peppol sending on the branch company using the parent company endpoint 5. Switch to branch company 6. Create a customer invoice in the branch company using a customer who is on the Peppol network (meaning insert a valid VAT number and then verify button in the Accounting tab) 7. Confirm and send the invoice via Peppol 8. Download the resulting xml file and check the "AccountingSupplierParty" nodes. It contains the data of the branch and not the ones of the parent company ### Cause of the issue: The EDI export logic was fetching the supplier data directly from the invoice's company record without checking for a delegated Peppol parent company, ignoring the hierarchical relationship defined in the settings. ### Reason to introduce the fix: This fix ensures that the AccountingSupplierParty in the UBL/CII file correctly reflects the parent company's data when applicable. opw-6030526 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260389
This update ensures that imported records open with the same context as the original import action. Previously, the imported list view didn't inherit the correct settings like default move types, leading to incorrect column visibility and data defaults. This fix maintains consistency and improves the user experience when working with imported data.
Original PR description
**Problem:** After importing records through the Import action, the list view that opens with the imported records does not inherit the context of the originating action. Column visibility and…
**Problem:**
After importing records through the Import action, the list view that opens with the imported records does not inherit the context of the originating action. Column visibility and default values that depend on that context (e.g. `default_move_type` on the shared invoice list) end up wrong.
**Steps to reproduce:**
1. Go to Accounting → Customers → Invoices
2. Click "Favorites → Import records"
3. Upload a CSV containing at least one valid customer invoice row
4. Run the import and look at the "Imported records" list that opens
**Current behavior:**
The imported records list opens with an empty context. Columns rendered conditionally on `default_move_type` (invoice-type-specific columns on `account.view_invoice_tree`) are not shown as they are when opening the list from the menu, and records created from that list have no default move type.
**Expected behavior:**
The imported records list should open with the same context as the action the user started the import from (e.g.
`{ default_move_type: 'out_invoice' }` for customer invoices), so columns and defaults match the previous view.
**Cause of the issue:**
`openRecords()` in `import_action.js` builds the follow-up `ir.actions.act_window` but never forwards `this.model.context`. The model already holds the context passed through the import action's `params.context`, but it is dropped when the redirect action is dispatched, so the window action opens with an empty context.
**Fix:**
Forwarding the context the import was launched with keeps the user inside the same functional scope (invoice type, default partner, company, etc.) when they land on the imported records list. Column visibility logic and default values that rely on that context behave identically to opening the list through the normal menu flow.
opw-6120758
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#261309The budget report now accurately displays data without duplicate analytic lines. This issue stemmed from a recent performance optimization of the report's underlying query, which inadvertently created duplicate entries. The fix ensures unique and reliable budget reporting.
Original PR description
#### Issue: The budget report displays duplicate analytic lines. #### Steps to reproduce: In a new company: - Create a budget with one budget line (Analytic Account A). - Create one analytic item…
#### Issue: The budget report displays duplicate analytic lines. #### Steps to reproduce: In a new company: - Create a budget with one budget line (Analytic Account A). - Create one analytic item (linked to Analytic Account A). - Open the budget report and remove the default "open budget" filter. Duplicate amounts appear in the pivot view and duplicate lines appear in the list view. #### Cause: In #104299, the query in `_get_aal_query` was refactored for performance to avoid a single query with an OR condition in the LEFT JOIN. It was replaced by two separate queries combined with `UNION ALL`. This caused some lines to be captured by both queries, resulting in duplicates in the final report. #### Fix: Use three separate queries, each with specific filter conditions to guarantee unique results: Q1 - Analytic lines with no matching budget line. Q2 - Analytic lines matched to a budget line with no company (null-company). Q3 - Analytic lines matched to a company-specific budget line. OPW-6051696 Forward-Port-Of: odoo/enterprise#116612