Daily updates from Odoo
Thursday, May 28, 2026
56 changes · saas-19.3
Resolved issues and error corrections
This fix resolves an issue where confirming a sales order would only create one lead, even when multiple event registrations were involved. The update now correctly creates multiple leads based on each event registration, ensuring accurate lead tracking for multi-event purchases. This improves the reliability of lead generation within the CRM.
Original PR description
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation…
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation Rule with : - Create : Per Order - When : Attendees are created - Event : None - Create a new quotation with two lines : - Product : Even Registration for event A 1st, then B - Confirm the SO # The problem A traceback will appear # Cause of the issue When confirming the SO, we create `event.registrations`s that will check for lead generation rules and create or update `crm.lead`s accordingly : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L35 We will then group the registrations by leads & grouping model : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L166 For all groups, if the lead does not exist, we create one : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L184-L187 `_get_lead_values()` works fine with multiple `event.registrations`s, but crashes when those registrations does not have all the same event, which is our case : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L170 # Proposed solution Since we have multiple events and leads are associated to a single event : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/crm_lead.py#L11 We group the registrations by event and create multiple leads accordingly opw-6167518 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265017
This update enhances the testing process for Odoo apps submitted to the Odoo Apps Store. Specifically, it allows for more comprehensive checks of the app's manifest file, ensuring accurate pricing and currency information is included. This improves the quality and reliability of apps available on the Odoo Apps Store.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262653 Forward-Port-Of: odoo/odoo#255857
This update fixes an issue where the product gallery on mobile devices would reset to the first items after scrolling or changing screen size. The fix reintroduces a mechanism to only trigger a gallery update when the screen size changes, preventing unnecessary re-renders and ensuring a smoother user experience. This improves the visual consistency of the product catalog across different devices.
Original PR description
Scenario: - drop product catalog snippet and save - go to the second page of product - on some mobile scroll, or just change window size Result: we are reset to the first items of the gallery. Cause: in some mobile (eg. iOS safari) scrolling up or down make the address bar appear, that makes the viewport size change. Since 18.4 refactor of website, we rerender dynamic widget at any size change, so scrolling rerender the snippet. Fix: reintroduce saas-18.2 listenSizeChange that only trigger throttled change of media breakpoint and was removed from dynamic_snippet.js in 9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2. opw-6137005 Forward-Port-Of: odoo/odoo#260623
This update corrects a rounding issue that previously caused the withholding base amount on invoices to exceed the total invoice amount. The fix ensures that withholding calculations are accurate, preventing potential discrepancies in invoice totals. This improves financial reporting and reduces the risk of errors.
Original PR description
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install…
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install l10n_pe_edi 2. Create an invoice with those 2 lines: qty: 300, unit_price: 0.481936, tax: VAT 18% + 3% IGV Withholding qty: 300, unit_price: 0.747376, tax: VAT 18% + 3% IGV Withholding 3. Confirm the invoice, and send the xml (if this fail, you may have to change the name of the invoice, using odoo inspector or other means). 4. Open the xml, and notice the base amount for the allowance on the document level is 435.18 which is bigger than the invoice payable amount. **CAUSE** We exclude the withholding taxes to compute the invoice taxInclusiveAmount. When computing this amount, we round the line base and the tax total of the VAT 18% tax leading to the result of 435.17. When creating the allowance node for the Withholding taxes, the base used for the withholding taxes is the sum of the line base, and the tax total of previous tax NOT rounded. There is no easy way to change the withholding tax computation, so we just limit the base to not be bigger than the invoice total when there is rounding issues. opw-6010388 Forward-Port-Of: odoo/enterprise#113689
This update fixes a problem where the IT tax closing process incorrectly rejected valid quarterly VAT reports due to issues with year-end comparisons and incorrect data assumptions. The changes ensure accurate validation by correctly handling period gaps and using debit/credit columns for VAT reporting, preventing errors and improving the reliability of tax closing.
Original PR description
Description of the issue this commit addresses: The IT tax closing validation compared month numbers only, which broke across year boundaries and could reject valid quarterly progressions. It also assumed a balance column existed in monthly VAT report lines, but this report uses debit/credit columns, which could trigger a traceback. --- Desired behavior after this commit is merged: This commit computes the period gap with year-aware month deltas and aligns the allowed gap with periodicity (monthly or quarterly). It also checks VP lines using balance when present, or debit/credit as fallback, preventing crashes and ensuring consistent tax closing validation. --- opw-6131080 Forward-Port-Of: odoo/enterprise#118450 Forward-Port-Of: odoo/enterprise#117428
This update fixes an issue where payments weren't automatically linked to invoices when created after the payment was processed. Previously, invoices created while a payment was being processed would not be correctly associated with the payment, leading to reconciliation problems. This ensures payments are accurately linked to their corresponding invoices.
Original PR description
Steps to reproduce: - Ensure Automatic Invoice setting is on - Create sales order for product with ordered quantites invoicing policy - Generate a Payment Link - Pay with the ACH Direct Debit method via a provider (e.g. Stripe) - While the payment is processing, confirm the sales order, create an invoice, confirm the invoice Current Behavior: When the payment is finished processing, the payment is not automatically linked to the corresponding invoice Expected Behavior: When the payment is finished processing, the payment should be linked to the invoice despite it being created by a user Explanation: The payment transaction's link to invoice_id is severed in PaymentTransaction._invoice_sale_orders if an invoice is created before the payment is cleared. This will eventually lead to the account.payment created automatically later on not being reconciled with the invoice. opw-6087656 Forward-Port-Of: odoo/odoo#264800
This update resolves several issues related to how product attributes are displayed and handled in the Point of Sale (POS) kiosk mode. Specifically, it corrects how custom attributes are presented and ensures the 'Add to Cart' button functions correctly when a product uses a single, custom attribute. This improves the kiosk experience for users.
Original PR description
this pr fixes 3 bug, as all are closely related. Step to reproduce (hide is_custom attr in kiosk mode): - have two attributes A and B - A has only 1 attribute value with is_custom = True - B can have…
this pr fixes 3 bug, as all are closely related. Step to reproduce (hide is_custom attr in kiosk mode): - have two attributes A and B - A has only 1 attribute value with is_custom = True - B can have any two value ( ex. gender: male/female) - use it on a product and make it available in POS for kiosk - start kiosk and open that product Observation: - we do not get option to select option from A but the heading is visible - when we select from B, Add to cart is disabled. Cause: - we do not allow attribute values with is_custom = True in kiosk - but we display the attribute regardless - the Add to cart btn depends on `selectedValues`, which requires value from each attribute, in this case, we are not seletion anything from A - so it is disabled Fix: - we introduced `attributesToDisplay` which will hide heading in case of single custom value for any attribute - for Add to cart, wenow do not expect value from `is_custom` attribute values. Allow product with 1 attr which is `is_custom` to be configurable in configs other than kiosk) correct fix for commit Step to reproduce - have attributes A - A has only 1 attribute value with is_custom = True - use it on a product and make it available in POS - start pos and open that product Observation: - we do not get option to select add text for A Cause: - in pos, we consider product to be configurable only it has more than 1 attributes, which misses is_custom attr Fix: - we backport commit[1] and also considers its side effect by introducing `isProductConfigurable` for pos_self_order, which will still avoid `is_custom` attrs for kiosk [1] https://github.com/odoo/odoo/commit/5155c77a03ed2ff6c914eac41cc81ccb34b1f3c7 Empty page is displayed if product has only `is_custom` attribute value and other attribute with type other then 'no_variant' for combo item Step to reproduce - have attributes A and B - A has only 1 attribute value with is_custom = True - B has two values with type "always" - use it on a product and add that product in combo item and make it available in Kisok - start kiosk and open that combo and select that product Observation: - we do not get option to select Cause: - `availableAttributeValue` only show `no_variant` and non `is_custom` attribute values in attributeSelection component. Fix: - before mounting Attributeselection component, we check if product has required attribute or not. opw-6100965 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266138 Forward-Port-Of: odoo/odoo#257880
This update corrects a technical issue where the FAIA report was incorrectly referencing suppliers without matching entries in the system. This ensures accurate reporting of financial data, specifically for the LU company, and resolves a validation error within the report generation process. The fix ensures data integrity for financial reporting.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#117799This update ensures that Knowledge print assets are consistently loaded, regardless of how printing is initiated. Previously, printing through various methods sometimes resulted in blank articles. To address this, the stylesheet has been updated to prevent unintended styling impacts on other Odoo modules, improving the overall printing experience.
Original PR description
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms…
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms (keyboard shortcuts, contextual menu, etc.), which prevented us from consistently detecting when to load the assets. In those cases, the assets were not loaded and the article appeared blank (see: odoo/enterprise#70243). To ensure the assets are always loaded regardless of how printing is triggered, we moved them to the common print bundle and adopted the standard asset-loading approach. This change also simplifies the codebase by removing JavaScript workarounds previously used to load the assets dynamically. However, some CSS rules in the Knowledge print stylesheet target global elements such as the web client container. Since the stylesheet is now included in a global asset bundle and always loaded, these rules apply to all modules and may cause rendering issues when printing views outside of Knowledge. To prevent such side effects, the CSS rules in `knowledge_print.scss` will be updated to use more specific selectors. The rules will be scoped so they only apply when the container includes the Knowledge view (using the `:has`). This PR also refactors the stylesheet by removing outdated rules that no longer match any elements. Several of these rules predate the major UI refactoring introduced in Odoo 16. Task-5999878 Forward-Port-Of: odoo/enterprise#109379
This update resolves an issue where setting Intrastat fields on product templates without associated products would trigger an error. The fix ensures that the system correctly handles product templates without variants, preventing unexpected errors and improving data integrity. This ensures accurate reporting for Intrastat compliance.
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 that vendor price selections from product.supplierinfo are accurate, regardless of the user's timezone. Previously, the system incorrectly interpreted UTC dates, leading to missed price matches. This fix converts dates to the user's local timezone for precise calculations.
Original PR description
opw-6211908 ## Summary When selecting a vendor price from `product.supplierinfo`, the purchase module converts `purchase.order.date_order` (a `fields.Datetime` stored in UTC) to a `date` using…
opw-6211908 ## Summary When selecting a vendor price from `product.supplierinfo`, the purchase module converts `purchase.order.date_order` (a `fields.Datetime` stored in UTC) to a `date` using Python's `.date()` method. This extracts the **UTC calendar date** rather than the user's local date. For users in positive-offset timezones (e.g. `Pacific/Auckland` UTC+12, `Africa/Johannesburg` UTC+2), this produces the wrong day, causing `product.supplierinfo` records with `date_start`/`date_end` to be incorrectly included or excluded during vendor price selection. ### Affected methods | File | Method | |------|--------| | `addons/purchase/models/purchase_order_line.py` | `_compute_selected_seller_id` | | `addons/purchase/models/purchase_order_line.py` | `_prepare_purchase_order_line` | | `addons/purchase/models/purchase_order.py` | `_get_product_catalog_lines_data` | ### Fix Replace `.date()` calls with `fields.Date.context_today(record, timestamp=...)` which correctly converts the UTC datetime to the user's timezone before extracting the date. Also fixes `fields.Date.today()` → `fields.Date.context_today(self)` in `_prepare_purchase_order_line` for consistency (same issue — `fields.Date.today()` returns UTC date, not the user's local date). ## Steps to reproduce 1. Set user timezone to **Pacific/Auckland** (UTC+12). 2. Create a product with a vendor pricelist (`product.supplierinfo`) entry: - **Vendor**: any partner - **Price**: 50.00 - **Start Date**: 2026-05-13 - **End Date**: 2026-05-31 3. Create a **Purchase Order** for that vendor. 4. Set the **Order Deadline** to **2026-05-13 08:00** NZST (stored as `2026-05-12 20:00 UTC`). 5. Add the product as a line on the PO. **Expected**: The supplier price of 50.00 is selected — the user's local date (May 13) is within the validity window. **Actual**: No supplier price is matched. `.date()` on the UTC datetime returns `2026-05-12`, which is before `date_start` of `2026-05-13`, so the supplierinfo record is skipped. Forward-Port-Of: odoo/odoo#266468 Forward-Port-Of: odoo/odoo#263992
This update corrects a previous incomplete effort to ensure consistent terminology across Odoo. It replaces instances of 'VAT' with 'Tax ID,' which is a more widely understood term, particularly in the US and other countries. This change enhances clarity and accuracy for users.
Original PR description
Similar changes were made before but were incomplete [1]. In the US and many other countries the term VAT is not understood. Use the universally understood Tax ID instead. [1] https://github.com/odoo/odoo/pull/239362 task-6231891 Forward-Port-Of: odoo/odoo#265668
This update replaces the term 'VAT' with 'Tax ID' across Odoo Enterprise, addressing a common misunderstanding in international markets like the US. This change ensures accurate and universally recognized tax identification, simplifying processes for our global clients.
Original PR description
Similar changes were made before but were incomplete [1]. In the US and many other countries the term VAT is not understood. Use the universally understood Tax ID instead. [1] https://github.com/odoo/odoo/pull/239362 task-6231891 Forward-Port-Of: odoo/enterprise#117955
This update removes a redundant CSS selector that was slowing down the application's style recalculation process. While the change didn't affect how the Kanban view looks, it significantly improved overall performance by reducing the time browsers spend evaluating styles. This results in a faster and more responsive user experience.
Original PR description
Remove the unused selector `[class*="col-"]:has` from `kanban_color_picker_field.scss`. It no longer affects the view but negatively impacts global CSS performance because the global selector `[class*="col-"]` combined with `:has` is expensive to evaluate. This caused long "Recalculate style" times reported in the selector stats. Even if it no longer affects rendering, browsers still spend time evaluating it during style recalculation, hurting performance. Removing the selector removes that cost. Steps to reproduce: 1. Open the Project app. 2. Go to Configuration > Projects. 3. Switch to Kanban view. 4. Click the "..." button on a Kanban card. 5. Inspect the color picker with the dev tools and remove the rule on a `col-6` node nothing changes, demonstrating the rule is now useless. Forward-Port-Of: odoo/odoo#266382
This update resolves a technical glitch in a test environment that was causing a tour to fail. The fix ensures the tax return journal is always visible during testing, regardless of dependencies on other modules. This prevents delays and ensures consistent test results.
Original PR description
The tour clicks a Tax Returns button rendered on the tax-return journal's kanban card on the accounting dashboard. That button only appears when show_on_dashboard is True on the journal, which is flipped by an inverse defined in the accountant module. Since account_reports does not depend on accountant, running this test on a database without accountant installed (e.g. account_reports only) leaves the journal hidden and the tour times out on the first step. To fix this we force the journal to be shown in this test rather than relying on accountant. runbot-error-242120 Forward-Port-Of: odoo/enterprise#116806
This update resolves an error that occurred when calculating benefit costs with certain employee property fields. The fix prevents using property fields as cost fields, ensuring accurate benefit calculations. A video demonstrates the issue and the solution.
Original PR description
**Steps to Reproduce:** 1. Install `hr_payroll` with demo data. 2. Open Employee (e.g; Abigail Peterson) > Payroll tab > Gear Icon > Edit Properties. 3. Add a new property for Payroll and fill in the…
**Steps to Reproduce:** 1. Install `hr_payroll` with demo data. 2. Open Employee (e.g; Abigail Peterson) > Payroll tab > Gear Icon > Edit Properties. 3. Add a new property for Payroll and fill in the value also. 4. Go to Payroll > Configuration > Benefits. 5. Create a new benefit with: Salary Structure Type: Worker Cost Field: Payroll Properties (Employee Contract) 6. Save the record. Video: https://drive.google.com/file/d/1gHRkDW5G0bURlo9_IRgCnvqpE-8Fk1xa/view?usp=drive_link **Error:** `TypeError - unsupported operand type(s) for +: 'int' and 'Property'` **Cause:** The method `_get_benefits_costs()` directly sums values using: ``` self[benefit.cost_field] ``` When the selected cost field is a property field, it returns a **fields_properties.Property** object instead of a numeric value, and this object is not directly compatible with the arithmetic sum operation. **Fix:** This commit prevents selecting property fields as cost fields from the list of supported field types. sentry-7388663038 Forward-Port-Of: odoo/enterprise#113238
This update corrects a dependency issue within the Italian reporting module (l10n_it_reports). Specifically, a new filter was added to address a conflict related to pension fund type data, ensuring accurate reporting for Italian businesses. This resolves a technical problem that could have impacted report generation.
Original PR description
Commit: 0a5657297f312cb3e5f6c3ab6a281acf71fbee3b added a filter for the field l10n_it_pension_fund_type which is defined in l10n_it_edi_withholding and not l10n_it_reports runbot-242217 Forward-Port-Of: odoo/enterprise#113185
This update optimizes the process of exporting large datasets in Odoo reports. Previously, the system would consume significant memory when exporting many records at once. By batching the export calls and invalidating recordsets, we've reduced memory usage and slightly improved export times, especially for larger datasets.
Original PR description
When exporting a number N of records as XLSX or CSV file, we call the export_data() method for the N records at the same time. This method prefetches the selected fields for all the records which can lead to memory limit errors when N is too large. We propose to batch this call and invalidate the recordsets between batches. Benchmarks ----------- Execution time: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 3.82 s | 3.94 s | | 228 116 | 18.71 s | 19.36 s | | 394 381 | 31.02 s | 32.67 s | Memory usage: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 316.0 MB | 273.5 MB | | 228 116 | 796.9 MB | 620.8 MB | | 394 381 | 1.3 GB | 947.7 MB | opw-5881026 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266078 Forward-Port-Of: odoo/odoo#257333
This update resolves an issue where production orders created with batch sizes on materials didn't correctly update delivery quantities. The fix ensures that all related production orders are linked to the delivery, regardless of the batch size setting, improving the accuracy of inventory tracking during sales order fulfillment. This prevents discrepancies in stock levels.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO…
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO Route - In the Miscellaneous tab of the bom tick Batch Size and set it to 2 - Create and confirm a sale order for 6 units of P #### > Three MO's are created but only the last one will update the quantities of the delivery at validation of the production. ### Cause of the issue: The `move_dest_ids` of the `move_finished_ids` is only set on the last of the three productions. That is only the last MO is properly chained to the delivery via an MTO chain. This happens because the `move_dest_ids` field of the `mrp.production` model is a `One2Many` field: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L223-L224 Which implies that each move can be linked to at most one mrp.production via the `created_production_id` field. However, if you have set a batch size on your bom, it is expected for a single move to create multiple mo's. While the `move_dest_ids` of each of these MO is appropriately set in the create vals to be the mto `stock.move` of the delivery, due to the nature of the `created_production_id` field only the *last* mo will created with a set `move_dest_ids` as this is the only record that will be set as `created_production_id`. However, after the creation of these MO's, the related `move_finished_ids` will be recomputed: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1089-L1093 However, the `move_dest_ids` of the created moves will be set to be either the `move_dest_ids` of their production (which is unset for all but the last one) or these of the first production of the same `production_group` that is these generated by a common production split: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1263-L1267 Now, since neither are set in our use case, the `move_dest_ids` will not be set on the `move_finished_ids` which implies in particular that the mto link between our productions (but the last one) and the delivery is lost. Fix: Since we can not change the nature of the `move_dest_ids` and `created_production_id` in stable to become Many2Many fields, we need to find a way to propagate the `move_dest_ids` on moves without relying on the probably inaccurate value provided by the production. And, since the compute of the `move_finished_ids` could be launched at many other points than during a create process (because of the many dependencies), we can not solely rely on the creation context but rather new to provide a way to recreate the link from relations at any given point. We therefore rely on the `stock.reference`'s similar to what was done prior to 19.0 via the `procurement_group_ids`: https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/mrp/models/mrp_production.py#L1198-L1202 opw-6188069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266184 Forward-Port-Of: odoo/odoo#264951
This update fixes a minor issue where the 'Outgoing Mail Server' option was incorrectly visible in user preferences when the default external email server was set to 'False'. The change ensures that the system correctly interprets this setting as a boolean, preventing the option from appearing unnecessarily. This improves the user experience and avoids potential confusion.
Original PR description
**Steps to reproduce:**
- Go to Settings > System parameters
- Set the `base_setup.default_external_email_server` to `False`
- Go to any User > Preferences tab
- `Outgoing Mail Server` option is visible
- The choice dropdown is available if the Gmail/Outlook settings are set
**Issue:**
`has_external_mail_server` is a Boolean field computed from the `base_setup.default_external_email_server` system parameter.
After [1] it is parsed as a string with `get_str`, which means that the conversion from string to boolean will return `True` when the value is set and not null.
```py
bool('False') -> True
```
(It also seems that on saas this value is set by default)
**Fix:**
Properly parse it as a boolean using `get_bool`.
[1] https://github.com/odoo/odoo/commit/3482ba72c8cd461d5c6609f4953decc1d5a55dd8
opw-6229696
Forward-Port-Of: odoo/odoo#266490This update corrects a bug where the Email Alias helper wasn't visible in Helpdesk teams when the default external email server was disabled. The fix ensures the system correctly interprets the server setting as a boolean, preventing incorrect visibility settings. This ensures Helpdesk teams function properly regardless of the external email server configuration.
Original PR description
**Steps to reproduce:**
- Go to Settings > System parameters
- Set the `base_setup.default_external_email_server` to `False`
- Install Helpdesk app
- Go to any Helpdesk Team
- Email alias helper is not visible
**Issue:**
`has_external_mail_server` is a Boolean field computed from the `base_setup.default_external_email_server` system parameter.
After [1] it is parsed as a string with `get_str`, which means that the conversion from string to boolean will return `True` when the value is set and not null.
```py
bool('False') -> True
```
(It also seems that on saas this value is set by default)
**Fix:**
Properly parse it as a boolean using `get_bool`.
[1] https://github.com/odoo/enterprise/commit/c710031215c76a9e7ddb694d2a2787c8cca40dcd
opw-6229696
Forward-Port-Of: odoo/enterprise#118425A recent update to the l10n_be_coda module incorrectly commented out a test instead of updating it. This fix ensures that the test runs properly, verifying the functionality of the module. This resolves a minor issue impacting the accuracy of the test results.
Original PR description
Test was commented instead of updated in this commit https://github.com/odoo/enterprise/commit/f1fafe0060c221e4a268c897af30455cc3d029ef task-none Forward-Port-Of: odoo/enterprise#118428 Forward-Port-Of: odoo/enterprise#117924
This update fixes an issue where the 'Send Report' action was missing from the cog menu in the planning slot form view. This change ensures users can easily generate reports directly from the planning view, streamlining the reporting process. The fix was implemented by replicating a previous change from the Field Service module.
Original PR description
Issue: ---------------------------------------- Some actions that were in Field Service task form view app aren't anymore in planning slot form view. Steps to reproduce: ---------------------------------------- - Go to the list view of planning view and select some slots - In the cog the action "Send Report" is there - Go in the slot's form view - In the cog, the action is not there Cause: ---------------------------------------- During the merge of Field Srevice in Planning. The action was removed from the form view. Solution: ---------------------------------------- Like in [saas-19.1](https://github.com/odoo/enterprise/blob/62b11599d08afa93cb9391f0b5aee3c610a754c8/industry_fsm_report/views/project_task_views.xml#L135-L146) we add "Send report" to the cog menu in list view. opw-6227745 Forward-Port-Of: odoo/enterprise#117744
This update resolves an issue preventing the attendance management system from correctly filtering employees based on their country. A security restriction was removed to allow necessary access to the employee's country code, ensuring accurate attendance reporting. This change improves the functionality of the payroll and HR modules.
Original PR description
/hr_attendance:TestAttendanceManager.test_attendance_manager_rights uses write function defined in l10n_sa_hr_payroll_attendance which in some cases requires to read the country_code of an employee to filter. Access rights on employees blocked it from reading country_code. Added sudo on employee for reading and filtering on country_code. task-6226413 Forward-Port-Of: odoo/enterprise#117718
This update fixes a problem where generated PDF invoices were missing crucial item reference information. The change ensures that all product lines now accurately display the internal item reference, improving invoice clarity and accuracy. This resolves an issue impacting how vendor bills are presented to users.
Original PR description
Some XML vendor bills generated by external ERPs were missing the Description tag, which typically contains both the [ITEM_REF] and ITEM_NAME. As a result, product lines in the generated PDF could appear without the internal item reference. This commit ensures that the item reference is always included in the displayed product line. task-6080328 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259086
This update resolves an issue where UBL imports with taxes set to 'price include' were failing to correctly calculate tax amounts, particularly for invoices with multiple items. The fix ensures accurate tax retrieval and adjustment based on quantity, improving the reliability of UBL import processes. This impacts companies using UBL invoices with price-inclusive taxes.
Original PR description
**PROBLEMS** 1. On a company with taxes with price_include = True, we fail to retrieve a tax when importing a ubl. 2. The price_unit adjustement for when importing price-included taxes doesn't account for quantity. **STEP TO REPRODUCE** 1. Have a setup where the tax are only price_include. 2. Import a ubl, the taxes will not be retrieved. 3. Run odoo only with the fix for problem 1, and import the same ubl with some invoice quantity != 1 4. Notice the price unit are messed up for lines with quantity != 1 (odoo tries to correct the untaxed amount with a line, but this doesn't fixes the tax). opw-6159394 Forward-Port-Of: odoo/odoo#266107 Forward-Port-Of: odoo/odoo#262686
This update fixes an issue where CFDI (Mexican electronic invoice) documents were being generated with incorrect length limits for key attributes like 'Folio' and 'Serie'. The values were swapped, which caused invalid documents. This change ensures that all generated CFDI documents are compliant and accurate.
Original PR description
Issue: length limits for attributes `Folio` and `Serie` of the `<cfdi:Comprobante>` elements were swapped, which could result in generation of invalid documents. Solution: swapping the values. This should not affect anything for existing valid documents. task-6046738 Forward-Port-Of: odoo/enterprise#118452 Forward-Port-Of: odoo/enterprise#116955
This update resolves a potential issue that caused Out of Memory errors during the installation of the `sale_subscription` module on databases with many sales orders. The fix ensures that newly added fields are correctly initialized to 'null' during installation, preventing performance bottlenecks and improving the overall installation process.
Original PR description
### Description: Installing `sale_subscription` on databases with a large number of `sale.order` and `sale.order.line` can cause Out of Memory (OOM) errors. The issue comes from two stored compute fields, `last_invoiced_date` and `plan_id`. Since these depend on newly added fields, they should default to `null` during installation. ### Reference: opw-6201267 Forward-Port-Of: odoo/enterprise#118419 Forward-Port-Of: odoo/enterprise#118008
This update addresses a printing problem reported by a client who was unable to print without LNA. The fix involved correcting a missing check within the system, ensuring proper handling of printing requests and preventing errors. This resolves a critical issue impacting order fulfillment.
Original PR description
Based on the ticket below the client is experiencing an issue when printing without LNA. This PR fixes the missing key check opw-https://www.odoo.com/odoo/project/49/tasks/6232008 Forward-Port-Of: odoo/enterprise#118101 Forward-Port-Of: odoo/enterprise#118005
This update optimizes the performance of large spreadsheet tables, particularly in areas like the Accounting > Balances Sheets. By streamlining how the system checks styles, it reduces recalculation times during common actions like resizing windows or scrolling, leading to a smoother user experience.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior. This reduces work during the "Recalculate Style" phase (for example when hovering rows in large tables such as the Accounting > Balances Sheets). It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. Forward-Port-Of: odoo/enterprise#118535
This update enhances the accessibility of carousels on our website, making them easier to navigate using a keyboard. Specifically, it adds visual focus indicators and allows users to control the carousel with 'home' and 'end' keys, improving usability for all visitors.
Original PR description
[FIX] website: improve carousel accessibility To improve keyboard accessibility on carousels, the indicators container is not focusable anymore, and the indicators themselves now only have one…
[FIX] website: improve carousel accessibility
To improve keyboard accessibility on carousels, the indicators container
is not focusable anymore, and the indicators themselves now only have
one focusable button at a time.
The tab order is thus: previous button > active indicator > next button.
(The previous and next button may both appear before.)
You can still navigate among indicators with the left and right arrows,
which also moves the focus to the newly targetted indicator.
Note that other accessibility improvements remain to be done on the
carousels (add a pause/play button on auto-sliding carousels, place the
buttons before the carousel slide in the tab order, add some aria
attributes (roledescription, live), adaptative labels...).
[FIX] website: make focus visible on carousel arrows
When focusing manually (with tab / shift+tab) the previous/next arrows
in carousels, it is hard to follow where the focus is, because there is
no outline and the contrast is too small.
This commit adds a specific outline if the button is `:focus-visible`
(with both black and white to work on any background).
[IMP] website: pause carousel on focus within
Carousels are paused on hover (or touchstart), but if the focus is
inside one, it won't pause. That can make it hard to navigate within
interactive carousels during the sliding interval (e.g. the dynamic
products, which by default has 4 different products with 3 different
focusable links/buttons).
This commit applies the same behavior on focusin as Bootstrap's default
on mouseover, and on focusout as on mouseout.
[IMP] website: support home/end keys on carousels
When the focus is in a carousel, pressing the "home" key displays the
first slide and pressing the "end" key displays the last slide.
task-5470023
Forward-Port-Of: odoo/odoo#266428
Forward-Port-Of: odoo/odoo#244939This update corrects a bug preventing employees administrators from seeing the attendance smart button for other employees. The issue stemmed from how the system determined button visibility based on user group permissions, specifically related to attendance management. The fix ensures the correct groups are recognized to display the button, improving usability for managers.
Original PR description
## Issue When logged in with a user who has the *Employee: Administrator* (`hr.group_hr_manager`) and the *User: Read his own attendances* (`hr_attendance.group_hr_attendance_own_reader`) groups, but…
## Issue
When logged in with a user who has the *Employee: Administrator* (`hr.group_hr_manager`) and the *User: Read his own attendances* (`hr_attendance.group_hr_attendance_own_reader`) groups, but not the *Officer: Manage attendances* (`hr_attendance.group_hr_attendance_officer`) group, the user won't be able to see their own attendance on their own employee's form view.
Additionally, a user without no Employee group but with the *Officer: Manage attendances* group could not see the attendance smart button on other employees form view.
## Steps to reproduce
1. Install *Attendances* (`hr_attendance`)
2. Set Marc Demo's groups:
- *Employees: Administrator*
- *Officer: Manage attendances*: unchecked
- *User: Read his own attendances*: checked (implied by Role / User)
3. Log in as Marc Demo and open his own form in Employees
4. **The attendance smart button is missing, even though Marc Demo has the group to see his own attendance.**
For the second issue:
1. Set Marc Demo's groups:
- *Employees: No*
- *Officer: Manage attendances*: checked
- *User: Read his own attendances*: checked (implied by Role / User)
2. Log in as Marc Demo and open another employee's form
3. **The attendance smart button is missing, even though Marc Demo has
the group to manage other employee's attendance.**
## Cause
There are two employee views defined in `hr_attendance`: `hr_employee_public_view_form` and `view_employee_form_inherit_hr_attendance`. The two views have different conditions under which the attendance smart button is displayed:
- In the public view, which is seen by users who do not have the *Employee: Administrator* group, the button is only displayed if the employee form is the one of the current user.
https://github.com/odoo/odoo/blob/b13d831e4c3c27ec7756302270f78c15f576a296/addons/hr_attendance/views/hr_employee_public_views.xml#L9-L15
https://github.com/odoo/odoo/blob/b13d831e4c3c27ec7756302270f78c15f576a296/addons/hr/models/hr_employee_public.py#L119-L123
**This means that a user without the _Employee: Administrator_ group cannot see the attendance button of other employees, even with the _Officer: Manage attendances_ group.** This view should take into account the *Attendance Manager* group.
- In the other view, which is displayed for users with the *Employee: Administrator* group, the button is only displayed for attendance officers.
https://github.com/odoo/odoo/blob/b13d831e4c3c27ec7756302270f78c15f576a296/addons/hr_attendance/views/hr_employee_view.xml#L24-L29
**This means that if a user is an Employee Administrator, but is not an Attendance Officer, they cannot see their own attendance, even with the "own attendance" group.** This second view should take into account the _User: Read his own attendances_ group.
opw-6167399
Forward-Port-Of: odoo/odoo#263826This update resolves a technical issue that prevented users from expanding depreciation report lines for assets using the 'No Depreciation' method. The fix ensures the report function works correctly for all asset types, improving data accuracy and usability. This change was made to address a reported bug.
Original PR description
When a user expands the report line of a no-depreciation asset in the depreciation schedule report, a traceback is raised. Steps to reproduce the error: - Install ``account_asset`` module with demo…
When a user expands the report line of a no-depreciation asset in the depreciation schedule report, a traceback is raised. Steps to reproduce the error: - Install ``account_asset`` module with demo data - Go to Accounting > Accounting > Assets > Create a new asset > Set Depreciation Model: No depreciation and Fixed Asset Account > Confirm - Go to Accounting > Review > Depreciation Schedule - Select the current fiscal year in filters - Expand the asset report line Traceback: ```py UnboundLocalError cannot access local variable 'period_suffix' where it is not associated with a value ``` https://github.com/odoo/enterprise/blob/5edd033ce05d65a79bc5b21ad2d1559a1af78056/account_asset/models/account_assets_report.py#L388-L390 Here, ``period_suffix`` is only assigned when the asset method is ``linear`` or ``degressive``, For assets using the ``no_depreciation`` method, the variable remains undefined, leading to the traceback when returning the depreciation rate string. sentry-7504906018
This update resolves an issue where the 'Info & Tags' button was hidden on the Documents mobile Kanban view. The fix adjusts CSS styling to ensure the chatter section is always visible and accessible, improving the user experience for mobile document management. This prevents users from missing important information.
Original PR description
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not…
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not displayed but the button is still enabled - Switching to the list view properly shows it **Issue:** We have two conflicting css styling on mobile: - `overflow-hidden` was added for mobile to avoid multiple scroll bars - `min-height: 100%` which is due to the default `o_kanban_ungrouped` in the controller css This means that the element is present at the bottom of the page, but we can't get to it manually. When re-enabling the action we are properly moved to the existing chatter (but we can't go back to the top). Also the documents panel should have a single scrollbar to display all the records, but we still need a way to scroll the messages of the chatter. **Fix:** Set `min-height: 0;` for documents kanban to ensure the chatter is still visible and accessible on mobile by default. This makes the chatter take the full available height when displayed. original overflow fix: https://github.com/odoo/enterprise/commit/945b9e2b1c6752bd905695aa40b0babcf38c50cd opw-6061993 Forward-Port-Of: odoo/enterprise#118134 Forward-Port-Of: odoo/enterprise#113168
This update fixes a minor visual issue in the multi-currency popover. Previously, the display would include an awkward "on" with no date, which has now been removed to provide a cleaner and more professional user experience. This ensures consistent formatting across all currency conversions.
Original PR description
This commit fixes a formatting issue in the multi-currency popover when no currency exchange rate is available. Previously, the popover would awkwardly display the word "on" with no trailing date (e.g., "CHF 22.81 at $ 1.00 on"). The template now conditionally hides the "on" keyword when no date is present to ensure a clean UI. task-6227557 Forward-Port-Of: odoo/odoo#265022
This update fixes a visual issue in the technical settings where new link previews displayed a confusing internal record ID in the breadcrumb. Now, new previews show 'New' until saved, and saved previews display the actual URL, providing a cleaner and more user-friendly experience.
Original PR description
**Problem:** Opening a new `mail.link.preview` record from the technical view shows the internal record reference (e.g. `mail.link.preview,NewId_0x...`) in the breadcrumb instead of the standard…
**Problem:**
Opening a new `mail.link.preview` record from the technical view shows the internal record reference (e.g. `mail.link.preview,NewId_0x...`) in the breadcrumb instead of the standard "New" label.
**Steps to reproduce:**
1. Settings / Technical / Discuss / Link Previews
2. New
3. Observe the breadcrumb
**Current behavior:**
The breadcrumb displays `mail.link.preview,<id>`.
**Expected behavior:**
The breadcrumb should display "New" until the record is saved, and the source URL once saved.
**Cause of the issue:**
The model defines no `name` field and does not set `_rec_name`, so the default `_compute_display_name` falls into its fallback branch and returns `f"{record._name},{record.id}"` — exposing the technical reference in the breadcrumb both for unsaved records (`NewId_...`) and saved ones.
**Fix:**
Setting `_rec_name = 'source_url'` lets the standard display name machinery compute a meaningful label from the existing required field. Unsaved records then surface the standard "New" placeholder via the web client and saved records surface their URL, without introducing a redundant `name` field or overriding the compute.
opw-6095012
Forward-Port-Of: odoo/odoo#263577This update fixes an issue where Selection fields in dark mode sign templates appeared unreadable due to white-on-white text. The fix ensures that form controls within sign templates consistently display with appropriate contrast, regardless of the user's dark mode preference. This improves the overall user experience for sign creation.
Original PR description
**Problem:** When the user has dark mode enabled and a sign template contains a Selection field, both the displayed value and the dropdown option list are unreadable: the selected value renders…
**Problem:** When the user has dark mode enabled and a sign template contains a Selection field, both the displayed value and the dropdown option list are unreadable: the selected value renders white-on-white in the field, and clicking the dropdown shows an empty-looking popup (white options on white system menu). **Steps to reproduce:** 1. Enable dark mode in user preferences 2. Open Sign > Templates > duplicate any template 3. Add a Selection field with a few options (e.g. Low / Medium / High) 4. Save and Sign Now 5. Reach the Selection field and click it 6. Observe: the dropdown options are invisible (white on white) and, after picking one, the selected value in the field is also invisible **Cause of the issue:** The Selection sign item is rendered with a native `<select>` element inside the PDF.js iframe (`sign_items.xml`, `t-if="type == 'selection'"` branch). The iframe's stylesheet (`sign/static/src/css/iframe.css`) declares the `select` rule with `background: transparent` but no explicit `color`, and never styles `<option>` at all. When the OS or the user activates dark mode, the iframe document resolves to a `color-scheme: light dark` root, so the browser's UA stylesheet paints form controls with the dark palette (white text). The popup background stays white (`<option>` has no explicit background), so options render white-on-white. The same UA-white propagates to the displayed value of the `<select>` inside the pink-tinted sign item, which is also nearly white. **Fix:** Pinning the `<select>` text color and the `<option>` color/background to fixed light-mode values restores predictable contrast inside the iframe regardless of the surrounding color scheme. We deliberately do not rely on `color-scheme: dark` here — that would only swap which side of the contrast issue we land on (browsers don't reliably honor it for `<option>` background painting), and the sign item background (the pink dashed default style) is itself light, so dark option text on a white popup is the readable target in all themes. opw-6197638 Forward-Port-Of: odoo/enterprise#117697
This update optimizes how the Point of Sale system calculates prices, particularly when dealing with complex product pricing lists. By streamlining the process, the system now responds faster, enhancing the overall user experience. This change improves the efficiency of price calculations within the POS module.
Original PR description
The getPrice function in product_template_accounting.js was a performance bottleneck when using large pricelists. This commit introduces the following optimizations: 1. Pre-index pricelist rules by product_id and product_tmpl_id at load time in ProductPricelist. 2. Replace the sort() operation with a single-pass scan to find the best matching rule (highest min_quantity that satisfies the current quantity). 3. Apply sequential rule precedence (Variant → Template → General), stopping as soon as a valid rule is found. 4. Move rule mappings from uiState to direct properties in ProductPricelist to avoid useless reactivity. 5. Centralize rule selection logic in ProductPricelist for better responsibility separation. task-id: 5965826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244268
This update corrects a bug in how Odoo searches for records using property fields. Previously, filters on numerical properties sometimes returned incorrect results due to a misunderstanding of boolean values in the search logic. This fix ensures that property searches work as expected, accurately filtering records based on their property values.
Original PR description
# How to reproduce - Go to the Form view of a model to which you can Add Properties (e.g. Project > Tasks) - Click on the gear icon > Add Properties - Create a property field with : - Name : X -…
# How to reproduce
- Go to the Form view of a model to which you can Add Properties
(e.g. Project > Tasks)
- Click on the gear icon > Add Properties
- Create a property field with :
- Name : X
- Field Type : Decimal
- Create two records for that model and set the value of the property to 1 & 2
- Go back and Add a custom filter with ('Properties.X', '=', 1)
# The problem
We see both records even tho we should only see one
# Cause of the issue
When doing the search, we transform the domain into the where clause of a
query. This transformation is done with the `condition_to_sql()`
function of the concerned field (`fields_properties` in our case):
https://github.com/odoo/odoo/blob/ba9e18688cc9c6e0d4da5ab60acf08d4c49b99d7/odoo/orm/fields_properties.py#L589
In this function, we manipulate a bit the condition depending on the value,
notably if the value is/contains True. To check it does, we do this :
https://github.com/odoo/odoo/blob/ba9e18688cc9c6e0d4da5ab60acf08d4c49b99d7/odoo/orm/fields_properties.py#L601
The issue is that in python, True in [1] and evaluates to True
because bool is a subset of int. This changes the condition and replaces it in
our case with ('Properties.X', '!=', 'False'), which is obviously not what
was initially asked for.
opw-6224811
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#266231
Forward-Port-Of: odoo/odoo#265835This update fixes an issue where COGS calculations were inaccurate, particularly with multi-stage customer returns. It ensures that quantity conversions are applied correctly and that the 'value' field on stock moves is only set when a move is fully completed, preventing incorrect monetary values from being applied to intermediate return steps. This improves the accuracy of COGS reporting.
Original PR description
[FIX] sale_stock: convert quantity using correct UoM The quantity unit conversion was applied to an already summed value, ignoring the fact that individual COGS lines may have different UoMs. --- [FIX] stock_account: Do not copy field 'value' of StockMove When a customer return is split into multiple steps (e.g., Customer -> Input -> Stock), the `value` field of the stock move was being copied from the first step to the second. This caused the second step (which should not be valued) to inherit the monetary value, leading to incorrect COGS entries when the invoice was posted. The value should only be set when the move is Done, not during a copy. --- OPW-6076350 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260495 Forward-Port-Of: odoo/odoo#257543
A recent issue where a specific tour (project_task_history_tour) was occasionally failing has been resolved. This fix ensures the tour consistently runs, improving the reliability of the project task history feature for users. This change was made as part of a standard bug fix process.
Original PR description
Since #237531 the tour `project_task_history_tour` seems to sometimes fail. runbot-238566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265466
This update corrects a technical error in the Odoo website builder's product page image functionality. The previous code incorrectly referenced a function, leading to a minor issue with image uploads. This fix ensures proper functionality and a seamless user experience for adding images to product pages.
Original PR description
The patch on `ProductAddExtraImageAction.getMediaDialogProps` extracted `loadResolveFunction` instead of `loadPromiseResolveFunction`. See also: - https://github.com/odoo/odoo/pull/262870
This update replaces the older PostgreSQL 12 installer with a newer version (16). This is necessary because PostgreSQL 12 is no longer supported, ensuring continued stability and security for our Odoo SaaS platform. Additionally, the installer now uses a dedicated Odoo user for database connections, improving security.
Original PR description
The Windows installer installs PostgreSQL 12. That version was chosen for its small size, but now in 2026 the size doesn't matter as much anymore. Also, version 12 is no longer supported, so it's time to bump to version 16. While at it, this commit adds an Odoo user for the PostgreSQL connection instead of using the superuser. Forward-Port-Of: odoo/odoo#266059 Forward-Port-Of: odoo/odoo#265134
This update resolves issues preventing IoT drivers from receiving websocket messages due to startup problems. Specifically, it handles scenarios where the device initially lacks an IP or database connection, and ensures the websocket client starts correctly after a successful data transmission attempt. This enhances the stability and reliability of data transfer from IoT devices.
Original PR description
This commit fixes several issues which can cause websocket messages to not be received: 1. If the IoT box does not have an IP when it first starts, the Websocket class will not be started (due to…
This commit fixes several issues which can cause websocket messages to not be received: 1. If the IoT box does not have an IP when it first starts, the Websocket class will not be started (due to `@require_db`). It will remain closed even if the IoT box connects to the network shortly after. 2. If the IoT box does have an IP but can't reach the database when it starts, the Websocket client will crash due to a missing try/except around the request to get a session from the DB. 3. If the IoT box fails the first `send_all_devices` call, the websocket channel will not be set when the Websocket client starts. This causes no messages to be received, since it does not subscribe to the channel. The changes are as follows: 1. The `@require_db` helper is removed from the Websocket client, and instead the server URL is provided explicitly. 2. Any exception raised by the session request is caught and logged, and the websocket can still continue connect attempts. 3. Instead of starting the websocket client after the first call to `send_all_devices`, it is started after the first *successful* call to `send_all_devices` so the channel is guaranteed to be set. 4. The closing status code is now logged as a warning instead of debug. This is to make it easier to troubleshoot websocket disconnections at a glance. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266710
This update corrects a technical issue that could cause CFDI invoices to be rejected by recipients. The fix ensures that Addenda nodes are created only once, adhering to strict XML standards set by the Mexican tax authority (SAT). This prevents errors and improves invoice acceptance rates.
Original PR description
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes. This…
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes.
This occurred because the method manually injects the new Addenda string at the end of the XML without checking if one was already present from a previous execution.
According to the SAT's Anexo 20 and the CFDI 4.0 XSD, the Addenda must be a single node and the last element of the Comprobante. Duplicating root-level nodes like `cfdi:Addenda` is a bad XML formation practice that can cause rejection by the recipient's automated systems.
This fix ensures the CFDI structure remains valid by:
1. Searching for an existing `{*}Addenda` node in the CFDI string.
2. Removing the old node before reconstructing the XML.
3. Preventing the string replacement logic from stacking multiple Addenda blocks.
This ensures that the CFDI remains clean and compliant with the official standard even if the process is triggered multiple times.
Forward-Port-Of: odoo/enterprise#109760This update fixes a bug where unexpected serial numbers were added to outgoing shipments when the quantity was set to zero. Previously, the system would automatically add available serial numbers, leading to quantity mismatches. Now, only the manually added serial numbers are correctly applied, ensuring accurate inventory tracking.
Original PR description
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few…
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few available serial numbers will be added to the move, which causes a mismatch of quantity and the number of serial numbers. **Before this commit:** If we have three serial number SN-001, SN-002, SN-003 created in order, and we set the quantity of the move to zero, then add SN-002 and SN-003 manually, SN-001 will be added automatically while saving. **After this commit:** Only SN-002 and SN-003 will be added to the move, which matches the quantity. **Steps to reproduce:** 1. Create a product with tracking by unique serial number, and create 3 lots SN-001, SN-002, SN-003 for this product. 2. Create a picking and add a move for this product, set the demand to 3 and quantity to 0. 3. Set the quantity to 2, and add SN-002 and SN-003 to the move, then save the picking. 4. SN-001 will be added to the move automatically, but the quantity stays at 2. opw-6121208 Forward-Port-Of: odoo/odoo#266583 Forward-Port-Of: odoo/odoo#263080
This update resolves a problem where Live Chat users couldn't access chatbot messages when using custom filters. The fix adds access permissions to the 'im_livechat_group_manager' group, allowing authorized users to view these messages. This change was triggered by a recent update to the Live Chat module.
Original PR description
**Steps to Reproduce** 1. Install the **Live Chat** module in version 18.4 or above. 2. Go to: **Settings → Users** * Open your user and change the access rights from **Live Chat / Administrator** to…
**Steps to Reproduce**
1. Install the **Live Chat** module in version 18.4 or above.
2. Go to: **Settings → Users**
* Open your user and change the access rights from **Live Chat / Administrator** to **Live Chat / User**.
* Alternatively, create a new user giving him rights of the **Live Chat / User** group.
3. Login using the Live Chat user.
4. Open the **Live Chat** application and navigate to: **Live Chat → Sessions**
5. Open any existing session. The session and its messages are accessible without any issue.
6. In the search bar, click: **Filters → Custom Filter**
7. Select the field `Chatbot Messages (chatbot_message_ids)`. You will face the below traceback.
**Issue Description:**
The issue happens because `discuss.channel` records are accessible to users having the `im_livechat_group_user` group through the Sessions menu: https://github.com/odoo/odoo/blob/459a775a066fe1465e53fc751045baed39f80118/addons/im_livechat/views/im_livechat_channel_views.xml#L310-L315
The field `chatbot_message_ids` is defined as:
https://github.com/odoo/odoo/blob/459a775a066fe1465e53fc751045baed39f80118/addons/im_livechat/models/discuss_channel.py#L165
This field points to the `chatbot.message` model, but access to that model is restricted to `im_livechat_group_manager` only:
https://github.com/odoo/odoo/blob/459a775a066fe1465e53fc751045baed39f80118/addons/im_livechat/security/ir.model.access.csv#L15
As a result, when a Live Chat user tries to use `chatbot_message_ids` in a custom filter, Odoo attempts to read `chatbot.message` records and raises an `AccessError`.
This issue started happening after the access rights changes introduced in pr : https://github.com/odoo/odoo/pull/201880
Specifically, the following ACL changes:
https://github.com/odoo/odoo/pull/201880/changes#diff-c1592d633a34db44a7cc2a527482cecc56127cbba72649e7318dcf63ccf477afR19-R20
**Solution:**
To fix this issue, added the group `im_livechat_group_manager` on the field `chatbot_message_ids` so only those user can access the field who belong to the group.
**Traceback:**
```.py
odoo.exceptions.AccessError: You are not allowed to access
'Chatbot Message' (chatbot.message) records.
This operation is allowed for the following groups:
- Live Chat/Administrator
Contact your administrator to request access if necessary.
```
opw - [6169395]
upg - [4274573]
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#266817
Forward-Port-Of: odoo/odoo#264682This update corrects a bug that prevented accurate invoice generation for Point of Sale (POS) orders. Previously, the system couldn't properly process lot numbers from POS orders, leading to errors. This fix ensures that POS order lot information is correctly linked to invoices, improving order accuracy and financial reporting.
Original PR description
POS order lines store lot/serial numbers as `pos.pack.operation.lot` records, while the shared invoice lot hooks expect `stock.lot` records. When `sale_stock_product_expiry` extends the invoice lot values, it reads `expiration_date` from the received lot. For invoiced POS orders, this crashes because POS passes a `pos.pack.operation.lot`, which has no such field. Resolve the matching `stock.lot` from the POS lot name, product, and company before extracting extra invoice lot values. opw-6193332 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263495
This update fixes an issue where users weren't notified when expense authorizations were updated or cancelled. Previously, the system ignored events related to authorization changes, preventing users from knowing their expenses were affected. This change ensures users receive timely updates regarding their expense authorizations.
Original PR description
## [FIX] hr_expense_stripe: Fix error messages coherence Fix the incoherent punctuation ## [FIX] hr_expense_stripe: Fix reversed and expired authorizations Before this, when receiving an `issuing_authorization.updated` event, the event would be ignored and the user would never know that the expense had been cancelled opw-6210055 Forward-Port-Of: odoo/enterprise#118574 Forward-Port-Of: odoo/enterprise#117257
This update ensures that all point-of-sale orders, including those that have been invoiced, are now accurately reflected in the periodic digest emails sent to users. Previously, only un-invoiced orders were counted, leading to an incomplete view of sales activity. This change improves the accuracy of digest reports.
Original PR description
Currently in the periodic digest sent by mail only the pos orders that are not invoiced are counted. Steps to reproduce: ------------------- * On empty db (no order previously) * Create a pos order of 10$, don't invoice it * Create a pos order of 10$, invoice it * Close session * Generate the periodic digest: * Go to settings * Under Emails, find "Digest Email" * Select "Configure digest emails" * Select "Your Odoo Periodic Digest" * Make sure "Pos Sales" is ticked * Select "Send Now" * In debug: * In the settings, under Technical, select Emails > Emails * Select the Periodic Digest > Observation: In the point of sale tab, it shows only 10$ Why the fix: ------------ Previously pos orders that were invoiced were not taken into account, now they are. opw-6111304 Forward-Port-Of: odoo/odoo#262561
This update resolves an issue where users without sign permissions were unable to access records with sign request activities, resulting in an access error. The fix ensures that all users, including those without sign rights, can view sign request activities by using sudo and controlling access to activity buttons.
Original PR description
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature…
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature request. - With user B, try to access the record. -> AccessError when trying to fetch the chatter. **Cause** By default, users get access to all the activities associated to records they have access to (see `_search` of `mail.activity`). This is an issue since some of the fields added in `_store_activity_fields` for the sign request activity display might not be accessible for a user with access to the activity. **Change** Use `sudo` to be able to display the activity, even if the user doesn't have access to the sign request. Also, in that case, `can_write` should be `False` in order to hide the action buttons of the activity, which trigger access errors when trying to make operations on the sign request. Another related change is to create the activity for the user creating the sign request, this avoids falling back on the `user_id` of the record associated with the activity and makes sure the activity's user has access to the sign request. opw-6157455 Forward-Port-Of: odoo/enterprise#116540
This update ensures that the product unit of measure (UoM) price isn't displayed in catalogs like MRP when the overall product price is already hidden. This improves the user experience by only showing relevant pricing information, aligning with how prices are typically presented when they're unavailable. It's a minor fix to improve clarity.
Original PR description
Steps to reproduce: - Enable units of measure and packagings. - add a move in a manufacturing order. - change the unit to one that is different than the product's unit. Issue: In some catalogs (for example MRP), we don't show the price to the user. so it wouldnt make sense to show the price per product unit either. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where the 'is typing' indicator incorrectly appeared in muted conversations. The change disables this indicator for muted channels, ensuring a cleaner and more accurate experience for users. This improves usability and prevents unnecessary notifications.
Original PR description
Before this PR, the "is typing" indicator could be shown on a muted conversation. This PR disables this feature for muted conversations by forcing the isTyping field to false when muted. Ideally, we should not even send the is typing notification, but that is not possible since we broadcast them to the entire channel. task-6154090 Forward-Port-Of: odoo/odoo#265879 Forward-Port-Of: odoo/odoo#265480
This update prevents the automatic generation of OIOUBL XML files for users who do not have a VAT number when using Nemhandel. Previously, this could lead to unnecessary XML creation and potential compliance issues. This change ensures that Nemhandel functionality is only available to users who require it.
Original PR description
Users with no VAT number shouldn't be able to use Nemhandel and shouldn't have a OIOUBL xml generated. task-6196225 Forward-Port-Of: odoo/odoo#266670 Forward-Port-Of: odoo/odoo#263244
This update fixes an issue where adding images to product pages in the editor mode was failing. The change updates how images are stored to align with recent Odoo updates, ensuring images are correctly saved and displayed. This improves the user experience for product customization.
Original PR description
Versions -------- - saas-19.3+ Steps ----- 1. Go to the product page in editor mode. 2. Press the "Add More" button next to "Extra Media" 3. Add an image by URL. 4. Select the new image and press…
Versions
--------
- saas-19.3+
Steps
-----
1. Go to the product page in editor mode.
2. Press the "Add More" button next to "Extra Media"
3. Add an image by URL.
4. Select the new image and press "Add".
Issue
-----
Traceback
```python
Traceback (most recent call last):
File "/data/build/odoo/odoo/http/router.py", line 432, in serve_db
return retrying(serve_func, env=request.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
File "/data/build/odoo/addons/website_sale/controllers/main.py", line 757, in add_product_media
product_product.write({"product_variant_image_ids": media_create_data})
...
File "/data/build/odoo/odoo/orm/fields_binary.py", line 84, in convert_to_cache
raise TypeError(f'{self}: use BinaryValue instead of {value.__class__.__name__}')
TypeError: product.image.image_1920: use BinaryValue instead of bytes
```
Cause
-----
When saving the image, the remote URL is fetched and the raw `bytes` are stored in the `product.image.image_1920` field. However, since commit 41fe2ebdb9cc37341362d7af829c087a5f72f9f1, raw `bytes` cannot be directly assigned to `Binary` fields.
Solution
--------
Use the new `BinaryBytes` wrapper.
See also:
- https://github.com/odoo/enterprise/pull/116273This update corrects a technical issue in the Odoo versions timeline that was causing incorrect data display. The fix ensures the timeline accurately reflects version changes by directly pushing items instead of lists, resolving a previous data processing error. This improves the overall accuracy and reliability of version tracking.
Original PR description
The push function does not take a list of items but items. So when it was pushed into the fieldNames list it would create a list with ['display_name', [...]] which is not wanted. task-6072932 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#266767 Forward-Port-Of: odoo/odoo#256130