Daily updates from Odoo
Thursday, May 28, 2026
231 changes
24 changes
Enhancements to existing features
This update allows the IoT box to broadcast its IP address via Bluetooth for 5 minutes after startup. This simplifies troubleshooting for clients and support teams by providing a quick way to identify the device's network connection status. If no network is available, it will advertise 'No network connection' instead.
Original PR description
This PR allows the iot box to advertise its ip address over Bluetooth for 5 minutes after boot. The format is `IoT Box [S/N] - [ip]` If no network is available it would advertise "No network connection" instead of the ip This can help clients and support to troubleshoot IoT Box issues. Forward-Port-Of: odoo/odoo#265878 Forward-Port-Of: odoo/odoo#265738
This update clarifies the documentation for how API keys are generated and revoked within Odoo. The changes standardize documentation and add descriptions for key parameters, ensuring developers have clear guidance and improving the overall quality of the codebase.
Original PR description
Clarify and complete the docstrings of `res.users.apikeys` methods: - document accepted union types for `scope` and `expiration_date` parameters of method `_generate`, and standardize its `:returns:` and `:rtype:` annotations - add missing parameter descriptions for `generate` and `revoke` Forward-Port-Of: odoo/odoo#265488
Resolved issues and error corrections
This 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
2 changes
Resolved issues and error corrections
This update removes a redundant CSS rule that was slowing down the application's style recalculation process. While the change didn't affect how the Kanban view looked, it significantly improved overall performance by reducing the time browsers spent 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 fixes an issue where combo product prices were incorrectly duplicated in sales orders when all component prices were zero. The fix ensures the combo price is accurately distributed across its items, preventing double-billing and improving order accuracy. This improves the user experience and reduces potential pricing discrepancies.
Original PR description
**Problem:** When a combo product has a price but all of its combo components have a zero list price, the quotation shows the combo's price twice: once on the combo line itself and once on the last…
**Problem:** When a combo product has a price but all of its combo components have a zero list price, the quotation shows the combo's price twice: once on the combo line itself and once on the last combo item line. **Steps to reproduce:** 1. Create a combo product with a non-zero price and two or more combo groups whose component products have a zero list price. 2. Create a sale order, add the combo, pick one item per group. 3. Look at the quotation/order: the combo line total and the last combo-item line both show the full combo price. **Current behavior:** The full combo price ends up on the last combo item line; the other combo items show 0. The combo line then displays the same total via `_get_combo_totals`, so the same amount appears twice. **Expected behavior:** The combo's price is spread across its combo items so no single line duplicates the combo total. **Cause of the issue:** `_get_combo_item_display_price` prorates the combo price by each combo's base price. When every base price is 0, every prorated price is 0, so `combo_price_delta` equals the full combo price and is added to the last combo as a rounding correction, concentrating the whole price there instead of spreading it. **Fix:** Treat an all-zero base case as "no proration signal" and split the combo price evenly across combos before the delta adjustment runs. The delta correction then only handles rounding, as intended. opw-6217945 Forward-Port-Of: odoo/odoo#265829 Forward-Port-Of: odoo/odoo#265010
28 changes
Enhancements to existing features
This update enhances the OBOX order process within Self Order and Point of Sale systems. It now includes a timeout feature, allowing orders to be tracked even when devices aren't on the same network as the OBOX. This improves reliability and order fulfillment for users with disconnected devices.
Original PR description
Is now possible to await OBOX jobs with a specific timeout in PoS ans Self Order. This is usefull when the user device isn't connected on the same network as the OBOX and others hardware. taskId: 6248159
This update enhances the way Odoo handles communication with OBOX devices in Self and Point of Sale environments. It now includes a timeout feature, allowing for reliable operation even when devices aren't on the same network, improving overall system stability and usability.
Original PR description
Is now possible to await OBOX jobs with a specific timeout in PoS ans Self Order. This is usefull when the user device isn't connected on the same network as the OBOX and others hardware. taskId: 6248159
This update clarifies the documentation for how API keys are generated and revoked within Odoo. The changes standardize the documentation for improved clarity and accuracy, ensuring developers can effectively use and manage API keys. This supports better security and maintainability.
Original PR description
Clarify and complete the docstrings of `res.users.apikeys` methods: - document accepted union types for `scope` and `expiration_date` parameters of method `_generate`, and standardize its `:returns:` and `:rtype:` annotations - add missing parameter descriptions for `generate` and `revoke` Forward-Port-Of: odoo/odoo#265488
Resolved issues and error corrections
This update fixes an issue where multiple lines of text were incorrectly converted into separate code or quote blocks within the HTML editor. Now, selecting multiple lines automatically combines them into a single, correctly formatted block, enhancing the editor's usability. This ensures consistent formatting and a better user experience when working with code or quotes.
Original PR description
Steps to reproduce: - Write multiple lines of text. - Select all lines. - Change block type from Normal to Code (or Quote) via the toolbar. Description of the issue: - Notice that each line is now a separate code block (or quote). Cause: - The `setBlock` method currently converts each selected block individually into the target block type, creating multiple blocks when multiple lines are selected. Solution: - For code and quote blocks, `setBlock` now converts only the first selected block into the target type and merges the content of the other selected blocks into it, ensuring a single code/quote block. task-6068930
This update ensures that invoices generated from Point of Sale orders now correctly include the product's internal reference (like 'E-COM11') alongside the product name. Previously, invoices lacked this key detail. This change improves invoice accuracy and traceability for sales transactions.
Original PR description
Currently invoices generated from pos orders do not show the product referense alongside the product name. Steps to reproduce: ------------------- * Open shop and select Cabinet with doors * Add…
Currently invoices generated from pos orders do not show the product referense alongside the product name. Steps to reproduce: ------------------- * Open shop and select Cabinet with doors * Add customer to order * Pay the order * Wether you selected to invoice or you didn't, does not matter, you can invoice from the backend > Observe on the invoice that the product does not show the internal reference "Cabinet with Doors" * Create a sale order for the same product, deliver and invoice > Observe the invoice, the product shows reference "[E-COM11] Cabinet with Doors" Why the fix: ------------ After this commit: https://github.com/odoo/odoo/commit/aff477805577cb7ed00fb94440dda5cf2f29cb44 we're using `full_product_name` to set the name on move line name. We could simply add the reference when computing the product name but the logiq used to computed the display name is a bit more complex than simply adding it always. Instead we use both display_name and full_product_name to build the final name. This way it has the reference if any and all information about variants are kept as well. opw-5950016 Forward-Port-Of: odoo/odoo#253540
This update prevents the automatic generation of OIOUBL XML files for users who don't have a VAT number when using the Nemhandel payment system. Previously, this resulted in unnecessary XML files being created. This change ensures compliance and simplifies the system for users without VAT registration.
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#266253 Forward-Port-Of: odoo/odoo#263244
This update fixes an issue where UBL imports with taxes set to 'price_include' were failing to correctly calculate and apply taxes, especially for invoices with multiple items. The fix ensures accurate tax calculations and adjustments, addressing a potential revenue discrepancy during UBL import processes. This improves the reliability of our accounting data.
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 enhances the website's carousel functionality to be more accessible for all users, particularly those using keyboard navigation. The changes include making focus visible, pausing the carousel when focused, and supporting 'home' and 'end' keys for easy navigation. These improvements align with accessibility standards and provide a better user experience.
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 group permissions, specifically relating to attendance management. The fix ensures the button appears correctly for users with the necessary 'Employee: Administrator' and 'Officer: Manage attendances' groups.
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 fixes a technical error that prevented refunds in the Colombian Point of Sale (PoS) module. The issue stemmed from outdated code referencing an older function name, which caused a traceback during the refund process. This change ensures seamless refund functionality for Colombian businesses using the PoS.
Original PR description
**Steps to reproduce:** - Setup a columbian company, DIAN should be in demo mode - Go to the PoS and make a sale with a columbian customer - Refund it - A traceback appears **Why the fix:** Some legacy code was left untouched when we changed the old **get_partner()** to the new **getPartner()** so we got a traceback as this function does not exist anymore. We also change the **set_partner(partner)** to **setPartner(partner)** as it was also forgotten. opw-6231856 Forward-Port-Of: odoo/enterprise#118054
This update removes a redundant CSS rule 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 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, providing users with the necessary functionality on mobile devices. This improves the user experience for accessing document details.
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 visual issue in the technical settings where new link previews displayed a technical ID instead of a user-friendly 'New' label. The change ensures that new previews show 'New' until saved, and then display the actual URL, providing a cleaner and more intuitive experience for users.
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 corrects a technical issue where the versions timeline was incorrectly displaying data due to a misunderstanding of how items were being pushed to the system. The fix ensures the correct data is presented, improving the accuracy and usability of the timeline. This change focuses on internal data processing and doesn't directly impact users.
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#256130
This update addresses a technical issue related to how Odoo retrieves VIES identifiers for VAT calculations. Specifically, a potential race condition was fixed, ensuring accurate and reliable VAT processing. The changes also included enhanced testing and updates to align with IAP requirements, improving the stability and performance of the base_vat module.
Original PR description
- Avoid race condition while getting the IAP VIES identifiers - Clarify to which state the Intra-Community value has been updated - Increment validity of the webhook_token while waiting for a push update - Add more tests, especially for the controller and the cron - Remove no-longer-relevant tests task-none Forward-Port-Of: odoo/odoo#266687 Forward-Port-Of: odoo/odoo#260440
This update ensures that all point-of-sale orders, including those that have been invoiced, are now accurately reflected in the periodic sales digest emails. Previously, only un-invoiced orders were counted, leading to an incomplete view of sales performance. This fix corrects this issue, providing a more reliable report.
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 corrects an issue where property search filters weren't working as expected. The problem stemmed from a misunderstanding of how boolean values are handled within the Odoo search system. This fix ensures property filters accurately return the intended records.
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 strengthens the security of our Point of Sale system by ensuring that the correct access token is being used. The `PosCustomerDisplay` controller now validates incoming access tokens, preventing unauthorized access and improving overall system security. This change was implemented as part of a broader effort to enhance security protocols.
Original PR description
In this commit we adapt the `PosCustomerDisplay` controller such that it checks that the correct `pos.access_token` was sent. Task: 6144690 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262287 Forward-Port-Of: odoo/odoo#261545
This update replaces the older PostgreSQL 12 version in the Windows installer with the more current PostgreSQL 16. This change addresses end-of-life support for the previous version and improves security. Additionally, the installer now uses a dedicated Odoo user for database connections, enhancing security and stability.
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 an issue where delivery orders could be completed without recording serial numbers for tracked products, leading to data inconsistencies. The fix ensures that the quantity and serial number information are correctly synchronized during delivery order creation, preventing errors and maintaining accurate inventory tracking.
Original PR description
Writing both `quantity` and `lot_ids` on a tracked move in the same form save leaves `move.quantity` stored at the user value while `_set_lot_ids` unlinks the remaining move line; the picking can then be validated to 'done' with no serial recorded. Force `_compute_quantity` at the end of `_set_lot_ids` so the stored value stays in sync with the move lines. Steps to reproduce: - Serial-tracked product, 6 in stock - Create a delivery order for 6 units of that product - In the delivery form, on the move row: type "1" in Quantity and remove all 6 lots from the Serial Numbers widget. - Save, Validate Before: picking goes to Done with quantity=1 and no serial. After: clear UserError, quantity stays in sync with mls. opw-6192841 Forward-Port-Of: odoo/odoo#266632 Forward-Port-Of: odoo/odoo#266394
This update fixes a potential issue where duplicate Addenda nodes were being created in CFDI invoices. This ensured compliance with Mexican tax regulations (SAT) and the CFDI 4.0 standard, preventing invoice rejection by recipient systems. The fix maintains a clean, valid XML structure even with multiple processing attempts.
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 resolves a compatibility issue with a key library used to handle XML data within Odoo. By upgrading the lxml version, the system now functions correctly and avoids potential errors. This ensures smooth operation of Odoo's core features.
Original PR description
Note: support for version 6+ of lxml has been merged in odoo/odoo@4b1797fccdf1447a8adb817148cc39bc322428a6 runbot-938365 Forward-Port-Of: odoo/odoo#266627
This update resolves a performance issue in the HTML Builder where the shape selector panel was causing significant delays and UI freezes. By delaying the loading of panel content until it's needed, we've dramatically reduced the number of requests and improved the overall responsiveness of the builder. This ensures a smoother and faster experience for users.
Original PR description
The shape selector panel was eagerly compiling and rendering its slot content on builder startup, triggering 200+ concurrent SVG thumbnail requests before the user had opened the panel or selected an image. With browsers limiting parallel connections per domain, this flooded the request queue and caused the main UI to freeze for several seconds. Slot content is now deferred behind a `contentRendered` flag that is set the first time the panel is opened, so no compilation or network activity happens until the user actually needs it. task-5973702
This update corrects a technical issue in the currency settings module. The previous method of retrieving configuration parameters was outdated and has been replaced with a more modern approach. This ensures the currency settings function correctly within the Odoo Enterprise SaaS environment.
Original PR description
Since saas-19.1, get_param has been removed from ir.config_parameter and replaced by typed helpers such as get_int, get_float, and get_bool, etc. This commit replaces the deprecated get_param call with get_int to prevent an AttributeError.
This update resolves an issue where custom text attributes on products weren't correctly displayed when settling website orders through the POS system. Previously, the POS would show a placeholder instead of the customer's entered text. The fix ensures that custom attribute data is accurately transferred and displayed in the POS order lines.
Original PR description
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text…
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text entered by the customer. Steps to reproduce: ------------------- * Create a product with a free text attribute (create_variant='no_variant', is_custom=True) * Go to the website's shop (works best in a new private tab) * Fill the free text attribute and add the product to the cart * Click on checkout * In POS, open Quotation/Order and settle the order > Observation: the order line shows "Custom" instead of the text Why the fix: ------------ `SaleOrderLine._load_pos_data_fields` was not exposing `product_no_variant_attribute_value_ids` nor `product_custom_attribute_value_ids`, so the JS `settleSO` function received no attribute data on the `line` object. As a result, the new POS order line was created with empty `attribute_value_ids` and `custom_attribute_value_ids`, leaving `constructFullProductName` unable to find the custom text. The fix adds both fields to `_load_pos_data_fields` and updates `settleSO` to use them when building the new POS order line. The dynamic fetch path (`_getSaleOrder`) is also updated to explicitly read the `product.attribute.custom.value` records so the data is available for orders loaded at runtime. opw-5958678 Forward-Port-Of: odoo/odoo#265491 Forward-Port-Of: odoo/odoo#251993
This update fixes a potential issue where invalid characters in work addresses could cause errors during the generation of the DMFA report PDF. By adding a validation check, the system now prevents these errors, ensuring the report can be created reliably. This improves the overall stability and accuracy of the report.
Original PR description
Added a validation error in the _get_code function in case the code contains non-numerical characters. This prevents non-numerical characters input from breaking the DMFA report PDF generation. Task: 6231125 Forward-Port-Of: odoo/enterprise#117889
This update fixes a crash that occurred when purchase matching attempted to convert vendor bills with only a description and UoM, without a linked product. The change ensures purchase matching is robust when importing bills based on description, maintaining consistency with existing UoM conversion rules. This improves the reliability of importing purchase invoices.
Original PR description
### Issue before this commit: Opening the Purchase Matching wizard would crash if the vendor bill contained lines with a description and a Unit of Measure (UoM), but no product selected. ### Steps to…
### Issue before this commit: Opening the Purchase Matching wizard would crash if the vendor bill contained lines with a description and a Unit of Measure (UoM), but no product selected. ### Steps to reproduce the issue: 1. Enable Units of Measure in Settings 2. Create and confirm a Vendor Bill setting a description and a UoM, but leave the Product field empty. 3. Click on "Purchase matching" smart button 4. The system throws a traceback with the error: "The unit of measure Unit defined on the order line doesn't belong to the same category as the unit of measure False defined on the product." ### Cause of the issue: In the purchase.bill.line.match model, the field product_uom_qty was computed by calling _compute_quantity using line.product_uom_id. Since product_uom_id is a related field on product_id.uom_id, it returns False when no product is set. The UoM conversion logic cannot handle a False destination category, leading to the crash. ### Reason to introduce the fix: Make purchase matching robust when imported vendor bills contain lines identified only by their description and not by a product. Note that for `purchase.bill.line.match` corresponding to an account.move.line but not related to any product, the `product_uom_qty` should match the quantity of the `aml_id` instead of attempting a UoM conversion based on a missing product UoM for the behavior to be consistent with the inverse method: https://github.com/odoo/odoo/blob/59d6232979b8499fde6cb700df1870e2e38d0d3e/addons/purchase/models/purchase_bill_line_match.py#L45-L54 opw-5911526 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266269 Forward-Port-Of: odoo/odoo#257827
Code cleanup and technical improvements
This update simplifies how plugins manage submit buttons within the website builder. Previously, a single, hardcoded list required developers to modify core code for each plugin. Now, plugins can easily register their own submit button selectors, making the system more flexible and easier to maintain. This reduces development time and improves the overall stability of the website builder.
Original PR description
\* = website, website_payment Previously submit button selectors were defined in a single hardcoded string in the save snippet logic. This made the list harder to maintain and required modifying the base code whenever a new plugin needed to exclude its submit button from being saved as a snippet. Introduce a resource allowing plugins to register their own submit button selectors. Plugins can now extend this list directly from their code without modifying the base implementation. This makes the logic easier to maintain and provides a reusable extension point for other submit-button related behaviors in plugins. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263045 Forward-Port-Of: odoo/odoo#252679
3 changes
Resolved issues and error corrections
This update fixes a potential issue where users could select inactive Intrastat codes on products. Now, a warning message will appear if a user attempts to select an invalid or expired code, preventing incorrect data entry and ensuring accurate reporting. This improves data integrity and reduces the risk of errors.
Original PR description
Problem: When choosing an intrastat code on a product, all the codes are shown, even the ones that are expired or not yet active. Users can select an intrastat code that is not active. Steps to reproduce: 1. Check the intrastat code list and find a code with a start date in the future or an expiry date in the past 2. Note the code description 3. Open a product form view and try to set/change the intrastat code 4. Search for the code description noted in step 2 5. Note that the code is proposed while it should not be proposed Solution: When an intrastat code is selected, if the code is not active, a warning message is shown to the user. opw-6217915 Forward-Port-Of: odoo/enterprise#118417 Forward-Port-Of: odoo/enterprise#117884
This update fixes an issue where expected working hours displayed in the Attendances Gantt view were inaccurate for employees using non-UTC time zones. The fix ensures that hour calculations now correctly account for the user's local time, providing more reliable attendance reporting. This improves the accuracy of time tracking for flexible schedules.
Original PR description
Steps to reproduce: 1. Ensure your browser is in a non-UTC timezone (e.g. Europe/Zurich) 2. Set an employee to have a flexible working schedule 3. Enter the Attendances app 4. When hovering over the employee in the gantt view, the expected hours do not match their working schedule When we calculate the expected hours for the Gantt view in attendances, we calculate this based on an incorrect number of attendance intervals given from _attendance_intervals_batch(). To ensure that we recieve accurate intervals, we need to ensure that we calculate intervals based on the correct date range with respect to the browsers timezone, instead of the UTC date range. [opw-6175441](https://www.odoo.com/odoo/my-tasks/6175441?debug=assets) Forward-Port-Of: odoo/enterprise#116807
This update ensures that the General Ledger export aligns with the search filters applied in the user interface. Previously, the export didn't include all accounts matching the search criteria due to a difference in how the UI and backend search functions were implemented. This change corrects this discrepancy, providing more accurate and consistent export results.
Original PR description
When applying a search filter in the General Ledger, the lines displayed in the UI differ from the ones exported. The discrepancy comes from the fact that the UI search bar filters lines using a simple "contains" logic on the displayed line name, while the backend export relies on the account model’s `_name_search` behavior, just as in the chart of accounts. For example, searching for "40" displays the accounts 400000, 400010, and 124000 but the last one (124000) is not is in the export results. task: 5917435 Forward-Port-Of: odoo/enterprise#117002 Forward-Port-Of: odoo/enterprise#107928
16 changes
Resolved issues and error corrections
This update resolves an issue where error handling for JSON responses within Odoo was failing due to inconsistencies in how the requests library parses JSON based on the simplejson library's presence. By patching the library, this ensures consistent error handling and prevents unexpected failures when processing external data.
Original PR description
The requests library uses different libraries to parse json objects depending on whether or not the simplejson library is installed (https://github.com/psf/requests/blob/dc9dbdfb3434c6e58d48fd102f93e5342308817e/src/requests/compat.py#L74). This in turn causes our try/excepts to fail if the simplejson library is installed in the env we simply re-raise the json error in case the simplejson library is installed so our try/excepts flows are not broken by the existence of a random package opw-6150349 Forward-Port-Of: odoo/odoo#265031 Forward-Port-Of: odoo/odoo#264303
This update fixes a minor issue within the HTML editor where color selections weren't consistently updating in the toolbar. The team created a utility to wait for the browser's selection changes, ensuring the toolbar reflects the correct color before tests are run. This improves the reliability of the HTML editor's color selection functionality.
Original PR description
Before this commit: the test `cell's selected color should be shown in toolbar (3)` could fail when the bd color indicator isn't updated before the checking After this commit: we create an util to wait for the selectionchange event is fired by the browser to make sure the toolbar is updated before verifying. runbot-937780 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266445
This update fixes a problem where vendor bills generated by external systems were missing item references in the PDF output. The change ensures that all product lines now correctly display the internal item reference, improving the accuracy and clarity of invoices. This ensures consistent and complete product information for our customers.
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 a previous issue where transaction details weren't consistently saved for Viva Wallet payments, regardless of whether they were processed via webhook or polling. The fix ensures that all relevant payment information, including card details, is now accurately recorded, improving the reliability of our point-of-sale reporting.
Original PR description
After odoo/odoo#236454, a bug was introduced where the transaction details would only be saved if the payment was resolved via webhook, not via polling. This commit fixes the issue by using the same field names in the webhook payload as is received from the polling endpoint. In addition, the card number and card brand fields are now saved too. opw-6244960 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266629
This update resolves a potential crash in Odoo's test cases related to how mail messages are handled. Specifically, the system now safely checks for `None` values before accessing a key attribute, preventing an error when a mail message isn't present. This enhances the reliability of our automated testing.
Original PR description
This changes https://github.com/odoo/odoo/pull/230766/changes cause the issue. I fix `AttributeError` when `mail_message` is None in `assertNoMail` method. The method was accessing `mail_message.message_id `without checking if `mail_message` is `None` first, causing a potential crash in test cases. Added a conditional check to safely handle None values before accessing the message_id attribute. @qrtl Forward-Port-Of: odoo/odoo#255720
This update fixes an issue where the expected hours displayed in the Attendances Gantt view didn't accurately reflect flexible work schedules, particularly when users' browsers were set to non-UTC timezones. The change ensures accurate hour calculations based on the user's local timezone, improving the reliability of attendance tracking.
Original PR description
Steps to reproduce: 1. Ensure your browser is in a non-UTC timezone (e.g. Europe/Zurich) 2. Set an employee to have a flexible working schedule 3. Enter the Attendances app 4. When hovering over the employee in the gantt view, the expected hours do not match their working schedule When we calculate the expected hours for the Gantt view in attendances, we calculate this based on an incorrect number of attendance intervals given from _attendance_intervals_batch(). To ensure that we recieve accurate intervals, we need to ensure that we calculate intervals based on the correct date range with respect to the browsers timezone, instead of the UTC date range. [opw-6175441](https://www.odoo.com/odoo/my-tasks/6175441?debug=assets) Forward-Port-Of: odoo/enterprise#116807
This update resolves an issue where attachments added to emails sent via the 'Send by Email' action were disappearing after refreshing the chatter window. The fix restricts attachment saving to the full composer view, ensuring consistent functionality across different email composer types. This improves the reliability of sending emails with attachments.
Original PR description
**Steps to reproduce:** - Install Sales app - Create a Sales Order - Click on the 'Send by Email' action - Add an attachment and send it - Open the chatter to create a log note - Attachment is…
**Steps to reproduce:** - Install Sales app - Create a Sales Order - Click on the 'Send by Email' action - Add an attachment and send it - Open the chatter to create a log note - Attachment is attached to the new message - It disappears on refresh **Issue:** Attachment upload widget was moved to the toolbar of the composer with [1], which split it into `mail_composer_attachment_selector` and `mail_composer_attachment_list`. Then with [2] the selector logic was changed to use `FileUploader` instead of `FileInput` to get the attachment synced when switching back and forth between full and normal chatter composers. But this should not impact action composers created with `'mail.email_compose_message_wizard_form'`. **Fix:** Restrict the attachment save to the full composer using context. [1] https://github.com/odoo/odoo/commit/cee3c8146863300242f9f2d109743a50c2b91027 [2] https://github.com/odoo/odoo/commit/9f7249a141b618fc8640a65d1f7fc20023156ce3 opw-5164504 Forward-Port-Of: odoo/odoo#266091 Forward-Port-Of: odoo/odoo#265736
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 scenarios where product variants are not defined, preventing unexpected errors and improving data consistency.
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 fixes a bug where broken link trackers were appearing in the list and prevents users from creating trackers with invalid codes. The system now ensures tracker codes are valid and disables editing the target link after tracker creation, streamlining the process and improving data accuracy.
Original PR description
1. Remove the possibility to create link tracker with an empty code. Empty code tracker do not work, but still appear in the tracker list. Only accept alphanumerical chars in the tracker code. 2. Set the target link input as disabled after generating the tracker, since editing the target link at this point would have no impact. task-4531974
This update fixes an issue where new link previews in the technical view displayed a technical ID instead of a user-friendly 'New' label. The change ensures a cleaner and more intuitive experience for users creating link previews, showing 'New' until saved and the actual URL upon saving.
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 resolves a technical issue preventing Viva payments in the POS kiosk. The Viva payment system requires a unique identifier for the cash register, which was previously missing. This fix ensures the correct 'cashRegisterId' is sent, allowing Viva payments to process successfully and avoiding errors.
Original PR description
When validating a payment in POS Kiosk with Viva payment method we get a Viva.com error Viva’s card-terminal API validates the JSON body with Pydantic and requires a non-empty ``cashRegisterId``. Steps to reproduce: ------------------- * Open POS in kiosk * Make an order and pay with Viva > Observation: Viva returns a validation error: ``cashRegisterId`` is missing or required in the request body (Pydantic ``missing`` on ``body.cashRegisterId``). Why the fix: ------------ Compute ``cashRegisterId`` in the POS client as cashier name, then ``pos.config.name`` so the value is always a non-empty string sent to ``viva_wallet_send_payment_request``. opw-6091223 Forward-Port-Of: odoo/odoo#265817 Forward-Port-Of: odoo/odoo#258605
This update upgrades the Windows installer to use PostgreSQL 16, addressing the outdated and unsupported PostgreSQL 12 version. Additionally, the installer now uses a dedicated Odoo user for database connections, enhancing security and stability. This change ensures compatibility with current PostgreSQL standards and best practices.
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 a compatibility issue with a key library used to handle XML data within Odoo. The change ensures Odoo continues to function correctly with the latest version of the lxml library, which is a foundational component. This update is a routine maintenance task.
Original PR description
Note: support for version 6+ of lxml has been merged in odoo/odoo@4b1797fccdf1447a8adb817148cc39bc322428a6 runbot-938365 Forward-Port-Of: odoo/odoo#266627
This update fixes a potential issue where users could inadvertently select inactive Intrastat codes when setting them on products. The system now displays a warning message, preventing users from selecting invalid codes and ensuring data accuracy for reporting. This improves data integrity and reduces the risk of errors.
Original PR description
Problem: When choosing an intrastat code on a product, all the codes are shown, even the ones that are expired or not yet active. Users can select an intrastat code that is not active. Steps to reproduce: 1. Check the intrastat code list and find a code with a start date in the future or an expiry date in the past 2. Note the code description 3. Open a product form view and try to set/change the intrastat code 4. Search for the code description noted in step 2 5. Note that the code is proposed while it should not be proposed Solution: When an intrastat code is selected, if the code is not active, a warning message is shown to the user. opw-6217915 Forward-Port-Of: odoo/enterprise#118417 Forward-Port-Of: odoo/enterprise#117884
This update fixes an issue where the import process wasn't correctly reading invoice due dates from FatturaPA invoices. Now, the system accurately captures the due date for issued invoices, ensuring proper payment tracking. This resolves a previous error that defaulted due dates to today's date.
Original PR description
The import procedure stopped reading DataScadenzaPagamento (invoice date due) on `out_invoice`s and `in_refund`. As a side effect, invoice_date_due fell back to today() on those documents. This commit restores reading the invoice date due, and keeps the condiitonal logic only for the bank account and payment_reference logic incoming-only as it was before. Forward-Port-Of: odoo/odoo#264762 Forward-Port-Of: odoo/odoo#264573
This update ensures that the project associated with a sales order is automatically included in the generated Manufacturing Order, even with multi-step delivery routes (Pick + Deliver). Previously, this wasn't happening, causing issues with tracking projects in complex order flows. This change improves order management and reporting accuracy.
Original PR description
### Issue before this commit: When confirming a Sale Order with multi-step delivery routes (Pick + Deliver), the generated Manufacturing Order did not inherit the project_id from the Sale Order, even…
### Issue before this commit: When confirming a Sale Order with multi-step delivery routes (Pick + Deliver), the generated Manufacturing Order did not inherit the project_id from the Sale Order, even though the project was correctly set on the SO. ### Steps to reproduce the issue: 1. Download Inventory, Sales, PLM, Project 2. Enable multi-step routes in settings and unarchive MTO from routes 3. Go to Products and modify 1. Furniture Assembly inserting Project in "Create on Order" attribute and a test project template 2. Drawer selecting MTO and Manifacture in Inventory tab 4. Create a new quotation inserting 2 products: Furniture Assembly and Drawer and confirm it 5. Go to "Manufacturing" smart button 6. See in Miscellaneous tab the Project is setted as default 7. Go to warehouses, select the WH of your company and select Pick then Deliver (2 steps) as Outgoing Shipments 8. Go to Routes, select Deliver in two steps (pick + ship) and change "Destination location" of "Pull From" from Parteners/Customers into WH/output 9. Go to Rules: 1. "Pull From" (the one with Partener/Customers as destination location and MTO as route): change "Destination location" of from Parteners/Customers into WH/output 2. "Push To" (the one with Partener/Customers as destination location and with the deliver in 2 steps as route): change action from "Push To" to "Pull from" 10. Create a new quotation inserting 2 products: Furniture Assembly and Drawer and confirm it 5. Go to "Manufacturing" smart button 6. See in Miscellaneous tab the Project is not setted ### Cause of the issue: https://github.com/odoo/odoo/blob/d1955028bb95eff8d33c1c2b1c211d8520bb33a2/addons/sale_project_stock/models/stock_move.py#L71-L76 This function retrieves the project only based on the sale_line_id, which is correctly populated in a one-step delivery because the procurement is directly linked to the Sales Order (SO). However, the sale_line_id is not propagated to procurements that are not directly linked to the SO. In this scenario, with a two-step delivery, there are two stock moves: from Stock to WH/Output, and from WH/Output to the Customer. Only the second move (WH/Output > Customer) is linked to the SO, while this information is not propagated to the first move. As a result, the project_id information is lost. ### Reason to introduce the fix: Be sure that the project is automatically setted in the MO when a SO is confirmed whatever the intial delivery configuration is. opw-5913988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266808 Forward-Port-Of: odoo/odoo#261565
4 changes
Resolved issues and error corrections
This update fixes an issue where expected work hours displayed in the Attendances Gantt view were inaccurate for employees with flexible schedules, particularly when viewed through browsers using non-UTC time zones. The change ensures accurate hour calculations based on the user's local time, improving the reliability of attendance reporting.
Original PR description
Steps to reproduce: 1. Ensure your browser is in a non-UTC timezone (e.g. Europe/Zurich) 2. Set an employee to have a flexible working schedule 3. Enter the Attendances app 4. When hovering over the employee in the gantt view, the expected hours do not match their working schedule When we calculate the expected hours for the Gantt view in attendances, we calculate this based on an incorrect number of attendance intervals given from _attendance_intervals_batch(). To ensure that we recieve accurate intervals, we need to ensure that we calculate intervals based on the correct date range with respect to the browsers timezone, instead of the UTC date range. [opw-6175441](https://www.odoo.com/odoo/my-tasks/6175441?debug=assets) Forward-Port-Of: odoo/enterprise#116807
This update fixes an issue where commission plans were incorrectly listed in a salesperson's 'Other Plans' section when their assignment periods didn't overlap. The system now accurately checks for overlapping assignment dates, ensuring that plans are only shown when a salesperson is actively assigned to them. This improves the accuracy of commission reporting.
Original PR description
Version - 18.0 Steps to reproduce: 1. Create a commission plan A with effective period 2025–2026 2. Assign salesperson to plan A from 01/01/2025 to 31/12/2025 3. Create another commission plan B with effective period 2026 4. Assign the same salesperson to plan B from 01/01/2026 to 31/12/2026 5. Open plan B and check the 'Other Plans' section in the salespeople tab Issue: Plans are shown in 'Other Plans' even when salesperson assignment periods do not overlap. System incorrectly relies on plan effective dates instead of salesperson-specific assignment dates Fix: A plan is now considered overlapping only if the salesperson assignment periods intersect. Non-overlapping plans are properly excluded from 'Other Plans'. Taskid-6055253 Forward-Port-Of: odoo/enterprise#112694
This update fixes a potential issue where users could inadvertently select inactive Intrastat codes when configuring products. The system now displays a warning message if an inactive code is chosen, ensuring data accuracy and preventing incorrect reporting. This improves data integrity and compliance.
Original PR description
Problem: When choosing an intrastat code on a product, all the codes are shown, even the ones that are expired or not yet active. Users can select an intrastat code that is not active. Steps to reproduce: 1. Check the intrastat code list and find a code with a start date in the future or an expiry date in the past 2. Note the code description 3. Open a product form view and try to set/change the intrastat code 4. Search for the code description noted in step 2 5. Note that the code is proposed while it should not be proposed Solution: When an intrastat code is selected, if the code is not active, a warning message is shown to the user. opw-6217915 Forward-Port-Of: odoo/enterprise#118417 Forward-Port-Of: odoo/enterprise#117884
This update fixes an issue where intercompany sales and purchases with multiple identical products resulted in incorrect stock reservation during receipt picking. Specifically, the system was failing to properly reserve all units of a product when creating intercompany transactions with multiple lines. This ensures accurate stock tracking and fulfillment for intercompany business operations.
Original PR description
…lit for same-product lines When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned: - Enable Inter-Company…
…lit for same-product lines
When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned:
- Enable Inter-Company Transactions on both companies (Create and validate)
- Create SO in company A to company B with 2 lines having the same product P, Confirm. => Delivery in company A, Purchase and Receipts in company will be created => The SO/PO/Delivery/Receipt will all have 2 lines
- Validate delivery => On the receipt, the 2 units of P are reserved on the 1st move, and the 2nd move is not reserved.
https://github.com/user-attachments/assets/b4816051-120e-4226-9228-fd552649d5ef
---
### Test result without fix:
```
2026-04-23 13:16:44,577 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: Starting TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product ...
2026-04-23 13:16:44,949 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: ======================================================================
2026-04-23 13:16:44,949 48027 ERROR oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: FAIL: TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product
Traceback (most recent call last):
File "/home/odoo/Odoo/src/18.0/enterprise/sale_purchase_stock_inter_company_rules/tests/test_inter_company_so_to_po.py", line 109, in test_02_inter_company_multiple_lines_with_same_product
self.assertRecordValues(purchase_from_a.picking_ids.move_ids, [
File "/home/odoo/Odoo/src/18.0/odoo/odoo/tests/common.py", line 709, in assertRecordValues
self.assertSequenceEqual(expected_reformatted, record_reformatted, seq_type=list)
AssertionError: Lists differ: [{'pr[18 chars]0, 'quantity': 1.0}, {'product_uom_qty': 1.0, 'quantity': 1.0}] != [{'pr[18 chars]0, 'quantity': 2.0}, {'product_uom_qty': 1.0, 'quantity': 0.0}]
First differing element 0:
{'product_uom_qty': 1.0, 'quantity': 1.0}
{'product_uom_qty': 1.0, 'quantity': 2.0}
- [{'product_uom_qty': 1.0, 'quantity': 1.0},
? ^
+ [{'product_uom_qty': 1.0, 'quantity': 2.0},
? ^
- {'product_uom_qty': 1.0, 'quantity': 1.0}]
? ^
+ {'product_uom_qty': 1.0, 'quantity': 0.0}]
? ^
```
OPW-6145683
Forward-Port-Of: odoo/enterprise#1148739 changes
New functionality added to Odoo
This update allows 'work clothes fees' to be properly recognized as a benefit within the Odoo Enterprise system. Previously, these fees couldn't be managed effectively. By adding a dedicated benefit, businesses can now better track and account for these expenses.
Original PR description
purpose: Currently the "work clothes fees" can not be hidden because it's not linked to a benefit we can activate/deactivate - added a benefit for "work clothes fees" task-id: 6237160
This update introduces a new system for tracking devices connected to Obox, such as printers and scales. A button has been added to the Obox form to automatically discover and record these devices. Currently, this data is not actively used, but it lays the groundwork for future enhancements.
Original PR description
See: odoo/obox#176 In this commit, we add the `obox.device` model, which represents devices connected to the Obox, such as printers, scales and cameras. A button is added to the Obox form view to discover devices, which will create records for all the devices that are found. For now the device records cannot be used anywhere, but this will come in future PRs. task-6241705
Enhancements to existing features
This update enhances the quality control process within purchase orders by clearly identifying product variants when checking items, resolving a previous ambiguity. Additionally, the quality point search functionality now uses the title instead of the internal reference, providing a more intuitive and user-friendly experience.
Original PR description
1) Product Attributes in QC Wizard The quality check wizard within purchase orders does not display sufficient information when dealing with product variants. For example, if a company purchases tables in two colors -white and black- and needs to perform a quality check upon receipt, the wizard currently does not indicate which variant is being checked, as both products share the same name. This commit resolves this ambiguity by displaying the product's 'display_name' insted of just its name. 2) Quality Points: Search By Title Previously, when searching for a QP by title in the search view, the system relied on the 'reference' column internally. For improved clarity, this has been changed to a title filter. task: 4277084
This update simplifies the way employees access their payslips. A new smartbutton now automatically groups payslips by year, making it easier to find and view past payments. This enhancement improves the user experience and streamlines payroll access.
Original PR description
This will add default filter when accessing payslip view from employee using smartbutton, the filter will group the payslip by date_from year and set the expand = True task:6237600
This update streamlines Australian payroll by consolidating penalty rates into a single, global rate field. This eliminates confusion and ensures consistent overtime calculations in payslips. The change also simplifies the system by removing redundant fields and updating calculations for various work entry types.
Original PR description
Purpose: - The new global Rate field now provides a unified way to define pay rates for work entry types across all countries, making the AU-specific Penalty Rate redundant. - Remove duplicate rate…
Purpose:
- The new global Rate field now provides a unified way to define pay rates for work entry types across all countries, making the AU-specific Penalty Rate redundant.
- Remove duplicate rate definitions in AU payroll by merging Penalty Rate into the global Rate field, avoiding user confusion and ensuring consistent overtime computation in payslips.
- Ensure AU logic fully relies on the global Rate while preserving existing behavior for STP Code, casual loading, and leave loading.
This PR includes:
- Removed Penalty Rate field from model and views.
- Updated computation logic to rely on global Rate while preserving AU-specific behavior based on STP Code.
- Preserved STP-based logic and loading behaviors.
- Hidden the 'Add on Monthly Wage' checkbox for AU because its behavior is
already fully handled via STP code logic, making the field redundant/confusing.
- Added upgrade script to migrate existing Penalty Rate values into Rate to maintain backward compatibility.
- Converted Penalty Rate into Rate format during upgrade: Penalty Rate stores only the extra percentage (e.g., +50%), while Rate represents the full multiplier (100% base(Default) + extra), so where penalty rate is 50%, it becomes 150% (1.5) in Rate.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Note: Brief overview of AU payslip computation behavior.
Example: hourly wage = 10, Rate = 1.5, leave loading = 17.5%, casual loading = 0.25
1) For normal work entries, the global Rate value is combined with the employee
casual loading. In AU payroll, casual loading is additive and must be added
directly on top of the Rate multiplier instead of being multiplied separately.
- Example:
final calculation = 1.5 + 0.25 = 1.75
amount = 10 * hours * 1.75
2) For AU paid time off entries (AU.PT), the leave loading percentage must be applied
separately and the computation must stop after applying leave loading, meaning
casual loading must not be added on top of it.
- Example:
final calculation = 1.175
amount = 10 * hours * 1.175
3) For overtime work entries using STP code 'T', casual loading must also be
ignored. These entries should only use the Rate multiplier configured on the
work entry type.
- Example:
final calculation = 1.5
amount = 10 * hours * 1.5
- Related Upgrade PR: https://github.com/odoo/upgrade/pull/9557
task-5406660Resolved issues and error corrections
This update resolves an issue where constant fields within signing documents would become empty during the signing process, leading to signing failures. The fix ensures that default field values are preserved when auto-field calculations result in empty strings, preventing the 'Some required items are not filled' error.
Original PR description
Version: - saas-18.4 Steps to reproduce: - Create sign template. - Add a sign item with read only true and linked model and auto_value field set. - Send document for signing. - Try to sign the document. Issue: - Signing fails with "Some required items are not filled". - Constant readonly fields become empty during signing flow. Cause: - In `_populate_constant_items()`, the default field value was always replaced by `_get_auto_field_value()`. - When no reference document was set, `_get_auto_field_value() `returned an empty string. - This caused an empty value to be stored in `sign.request.item.value`. Solution: - Keep the default field value when auto-field resolution returns an empty string. - Only replace the value when a valid auto-field value is found. task-6229776 Forward-Port-Of: odoo/enterprise#118308 Forward-Port-Of: odoo/enterprise#117880
This update fixes a technical error that occurred when users reviewed eMPF contribution reports in the Hong Kong module. Specifically, the system was attempting to access employee information that wasn't available, causing a system error. The fix ensures a user-friendly error message is displayed, guiding users to correctly populate the necessary employee details.
Original PR description
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. -…
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. - Go to `Payroll` > `Reporting` > `Hong Kong` > `eMPF Contributions`. - Create a record by setting the `Scheme` and adding a `contribution line`. - Ensure that the employee and payslip fields are empty in the contribution line. - Click on `Validate`, then click on the `error icon` on the report line. `ValueError: Expected singleton: hr.version()` This error occurs when the user manually adds a line and checks the errors on it.. The system attempts to open the employee record from the version [1], but the version is not set [2] on the line because there is no employee. And it raise the error [3]. This commit ensures that when checking errors, if the version is not set on the line, a UserError is raised, prompting the user to set the employee on the line. It also corrects a typo in the status message. [1]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L219 [2]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L142-L156 [3]: https://github.com/odoo/odoo/blob/98855c6b70df24500babe6027109aa9e17431ec1/addons/hr/models/hr_version.py#L609-L611 Forward-Port-Of: odoo/enterprise#118414 Forward-Port-Of: odoo/enterprise#116607
This update addresses a warning message displayed in the Odoo Enterprise application related to the DMFA certificate. Closing the browser tab triggered this warning, which has now been resolved. This ensures a smoother user experience for employees using the payroll module.
Original PR description
task-6233555
Features or functions removed from Odoo
This update removes outdated export systems from the Odoo Enterprise platform. The goal is to streamline reporting by focusing on a single export format, simplifying future maintenance and improving efficiency. This change consolidates export capabilities within the core HR module.
Original PR description
In the related Community PR, we remove the export mixins from hr since the aim of the task is to drop the support for all the company specific exports and only concentrate on 1 export format. To do this, here we remove the extension of the mixin in hr_payroll and all the company specific modules. Community PR: https://github.com/odoo/odoo/pull/263225 Task: 6196138
3 changes
Resolved issues and error corrections
This update improves the performance of account report sheets by streamlining CSS styling and reducing unnecessary DOM calculations. By utilizing CSS variables and simplified selectors, the changes minimize visual rendering impacts, particularly on large tables, resulting in smoother user experiences.
This update resolves an issue preventing Belgian employees on flexible work schedules from taking multi-day leave. The fix ensures that the system correctly handles flexible schedules, eliminating an error that previously prevented leave validation. This improves the functionality for employees utilizing flexible working arrangements.
Original PR description
## Steps to reproduce: - Install l10n_be_hr_payroll module - Create a flexible working schedule and set the company to the Belgian company - Create an employee and assign the created schedule to him - Try to take a multi-day leave for this employee - Notice number of days is 0 - Try to validate the leave - An exception is raised 'The following employees are not supposed to work during that period' ## Cause: When fetching the work intervals for a belgian flexible employee we first fetch the normal work intervals then we call the same method but to filter the time credit attendance and since for the flexible employee there are not specific attendances we return the same normal work intervals and it will subtract those from the main work intervals which will result in an empty intervals to be returned ## Fix: Check if the working schedule is flexible and if so we don't check the time credit attendances at all. opw-6237642
This update fixes an issue where expected working hours displayed in the Attendances Gantt view were inaccurate for employees with flexible schedules, particularly when browsers were set to non-UTC timezones. The change ensures accurate hour calculations based on the user's local timezone, leading to more reliable attendance reporting.
Original PR description
Steps to reproduce: 1. Ensure your browser is in a non-UTC timezone (e.g. Europe/Zurich) 2. Set an employee to have a flexible working schedule 3. Enter the Attendances app 4. When hovering over the employee in the gantt view, the expected hours do not match their working schedule When we calculate the expected hours for the Gantt view in attendances, we calculate this based on an incorrect number of attendance intervals given from _attendance_intervals_batch(). To ensure that we recieve accurate intervals, we need to ensure that we calculate intervals based on the correct date range with respect to the browsers timezone, instead of the UTC date range. [opw-6175441](https://www.odoo.com/odoo/my-tasks/6175441?debug=assets) Forward-Port-Of: odoo/enterprise#116807
9 changes
Resolved issues and error corrections
This update resolves an issue where the translation dialog for HTML fields (like survey descriptions) would appear empty when the field was blank. The fix ensures that the dialog correctly displays with one row per installed language, allowing users to translate even empty fields. This improves the user experience when creating and managing translations.
Original PR description
The translation dialog of a translatable html field stays empty when the field has no value. A Char field like a survey question title shows one row per installed language, but the html Description…
The translation dialog of a translatable html field stays empty when the field has no value. A Char field like a survey question title shows one row per installed language, but the html Description field on the same form shows no rows and no inputs. get_field_translations builds the dialog rows. For an html field the translate attribute is the html_translate callable, so the rows come from the translatable terms found in the en_US value. An empty value has no terms, so the method returns an empty list and the dialog has nothing to render. update_field_translations also returns early when the field has no stored value, so a translation typed into the dialog could not be saved either. The fix lives in BaseModel because the behaviour is shared by every translatable html field, not by one model. get_field_translations now returns one empty row per installed language when a callable-translate field has no terms, and reports translation_show_source as false so the dialog uses the whole value layout like a Char field. update_field_translations routes a callable-translate field with no stored value through the same whole value write path already used by translate=True fields, so the first translation is stored. Steps to reproduce: 1. Settings > Translations > Add Languages: add and load a second language, e.g. French. 2. Surveys: open a survey, Questions tab, click a question to open its form. 3. Open the Description tab and leave the description empty. 4. Click the EN button on the Description field. => the translation dialog opens with no languages and no input fields Ticket [link](https://www.odoo.com/odoo/project.task/6237291) opw-6237291
This update fixes a technical issue that caused a traceback when attempting to mark workorders as done in certain scenarios, specifically when no workorders were open. The change ensures the system handles empty recordsets gracefully, preventing errors and improving stability.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910
This update fixes an issue where group holiday accruals were incorrectly showing as zero when the allocation start date was in the past. The change ensures that accrual calculations are properly computed and applied, resolving a discrepancy in holiday allocation amounts. This improves the accuracy of holiday tracking for employees.
Original PR description
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To…
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To reproduce: 1. Create an accrual plan with an easily measurable milestone (e.g. 1 day every day) 2. From the allocations view -> New Group Allocation 3. Enter the following values: Grant -> By Employee Employees -> select your employee Time Off Type -> Paid Time Off (doesn't matter too much) Allocation Type -> Based on Accrual Plan Validity Period -> any date a few days in the past (Personally I tested with 1/1/2025 and no end date) Allocation -> Keep at 0 Allocate Time Off 4. Go to the newly created allocation The allocation amount is 0. Reason ---------------------- When creating group allocations, the `hr.leave.allocation.generate.multi.wizard` calls the `_process_accrual_plans()` method to compute the accruals, but when the allocations are created, the nextcall and lastcall fields are set, so the accruals are not computed and the scheduled action also does nothing until the nextcall date. The onchange method manually sets the nextcall date to False so the accruals are processed. Solution ------------------ Created a method to get the fields that need to be set to calculate the initial accrual amounts from the start date, which is called both in the onchange and to batch write in the wizard before accrual plans are processed. The wizard checks the duration values before overwriting the number_of_days field, since user manually setting the amount should overwrite the calculations. task-4938695 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update automatically sets the deductibility prorata rate to 100% by default in the accounting reports. Previously, users had to manually configure this rate, which often led to inaccurate tax reports. This change simplifies the process and ensures more reliable tax reporting.
Original PR description
Users often forget to complete the deductibility prorata rate, which makes the tax report seems buggy. Set the rate to 100% by default. task-6092580 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users couldn't reliably remove formatting (bold, italic, underline) applied to inline code selections within the HTML editor. The fix ensures that formatting is properly detected and removed when users reapply shortcuts, improving the editor's usability and consistency.
Original PR description
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching…
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching `is_formattable_node_predicates` are ignored. However, when checking whether the selection is already formatted, those nodes are not ignored, so the selection is erroneously considered to be only partially formatted. Solution: Take `is_formattable_node_predicates` into account when checking whether a selection is formatted. Steps to reproduce: - Go to To-Do → Create New. - Type some text and add inline code on the same line. - Select all content using Ctrl + A. - Apply formatting such as bold, italic, or underline using keyboard shortcuts (Ctrl + B / Ctrl + I / Ctrl + U). - Press the same shortcut again to remove the formatting. - Observe that the formatting is not removed. task-6229228 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a technical issue where setting Intrastat fields on product templates without associated products would trigger an error. The fix ensures that the system handles this scenario gracefully, preventing errors and improving data integrity. This ensures accurate Intrastat reporting.
Original PR description
Problem: The Intrastat fields on product.template are computed without being stored. They are stored in product.product and the same values are used when computing the values on product.template. When trying to set the Intrastat fields on a product template without any product, an RPC error is raised without specifying the reason. Steps to reproduce: 1. Create a new product (product.template) 2. Add an attribute to the product with Variant Creation set to Dynamic, this will set no product variants (product.product) for the product template. 3. Try to set the Intrastat Commodity Code on the product template 4. Save the product template 5. Notice the RPC error raised without any explanation opw-6179705 Forward-Port-Of: odoo/enterprise#117856
This update ensures Odoo’s core systems (Trixie and Resolute) can properly handle the latest version of the lxml library, a key component for processing XML data. This change resolves a compatibility issue and improves the stability of Odoo’s XML processing capabilities. It’s a routine maintenance update.
Original PR description
Note: support for version 6+ of lxml has been merged in odoo/odoo@4b1797fccdf1447a8adb817148cc39bc322428a6 runbot-938365 Forward-Port-Of: odoo/odoo#266627
This update resolves a validation error that occurred during production recording when a subcontractor deleted and recreated a move line. The original code incorrectly invalidated the cache, leading to missing product UOM information. The fix maintains the existing logic while avoiding cache invalidation, ensuring accurate production recording.
Original PR description
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a…
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a subcontracting product with a comp A - Create and confirm a purchase order of that product (with the subcontracting partner) - Open the associated delivery - Open the move details (hamburger button) - Delete the move line linked to the comp A - Create a new move line for a comp B with a quantity of 1 - Record the production -> A validation error occurs: the mandatory field `product_uom_id` is not set. **Cause** The regression comes from this commit: https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e While assigning `move_raw_ids`, the inverse method is triggered: https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L34 At this stage, newly added lines are still virtual records (`line`): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L38 The previous implementation directly unlinked removed move lines (see commit https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L40-L43 Which will eventually flush and invalidate all the cache: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L4666 And since `line` is a virtual record (not in db), its associated values will be reset, among those, `product_uom_id`. Later, when the move line is reassigned: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L49 https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L5223-L5228 the validation fails because the virtual line no longer contains the required values. **Additional note** An alternative could have been using Command but since this line: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L42 can not be converted to: `Command.set([line.id for line in lines])` because `lines` may also contain virtual records. This causes an invalid quantity for the move. Indeed, even if the command operator would update the quantity on the `move_line` correctly, it won't for the quantity of the `move` because of its associated compute method: https://github.com/odoo/odoo/blob/26ba95ac1c5bbb24975efb1a6f53c1ab47b61532/addons/stock/models/stock_move.py#L399-L400 that relies on `.ids`, which is `[]` on virtual records. Therefore, keep the change minimal. opw-6133281
This update fixes an issue where Peppol/UBL XML files with embedded PDFs weren't automatically attached to vendor bills. The fix ensures that the PDF is correctly extracted and included as an attachment when receiving these XML files via email, improving the completeness of vendor bill data. This resolves a previous problem impacting invoice processing.
Original PR description
When receiving a Peppol/UBL XML file containing an embedded PDF via an email alias, the PDF is not extracted and attached to the resulting vendor bill. Steps to reproduce: - Set up a BE Company - Configure an incoming mail server - Set up an email alias for the Vendor Bill journal - Receive a Peppol XML with embedded PDF via alias - Check the created Bill Issue: PDF has not been extracted from the xml This occurs because the received xml is set as main attachment for the record and in this case we skip extraction opw-6075250 Forward-Port-Of: odoo/odoo#262047
2 changes
Resolved issues and error corrections
This update fixes an issue where upsell order lines weren't correctly calculating their invoiced quantity after a subscription was billed. The fix ensures that upsell quantities are accurately reflected in the sale order, resolving a discrepancy between order and invoice data. This improves the accuracy of subscription billing and reporting.
Original PR description
## **Issue:** When creating an upsell after a subscription is invoiced, the qty_invoiced field on the sale order line was showing 0.0, even though related invoice lines existed. ## **Steps to…
## **Issue:** When creating an upsell after a subscription is invoiced, the qty_invoiced field on the sale order line was showing 0.0, even though related invoice lines existed. ## **Steps to reproduce:** - Create and confirm a subscription. - Update the subscription `next_invoice_date` to a future date. - Generate an invoice for the subscription. - Create an upsell order from the subscription. - Confirm and invoice the upsell order. - Open the upsell sale order and check qty_invoiced. ## **Before Fix:** In _compute_qty_invoiced(), upsell lines have recurring_invoice=True and order_id.state='sale', so they are processed by _get_subscription_qty_invoiced(). The deferred date filter excludes their AMLs because of this condition, https://github.com/odoo/enterprise/blob/2ed34cc902d148fba7a88c159cd5c67a62112865/sale_subscription/models/sale_order_line.py#L189 returning 0.0 in the result dict. Since recurring_invoice=True, upsell lines never reach other_lines and super()._compute_qty_invoiced() is never called, causing qty_invoiced to fallback to its default value 0.0. After Fix 1 routes upsell lines to super()._compute_qty_invoiced(), a second issue is revealed. The _get_invoice_lines() overridden and applies a line.date > last_invoice_date filter. Since this condition fails and returns an empty recordset, leaving qty_invoiced at 0.0. ## **After Fix:** 1. In _compute_qty_invoiced(), upsell lines are routed to other_lines to bypass _get_subscription_qty_invoiced() and delegate to super()._compute_qty_invoiced(). 2. In _get_invoice_lines(), upsell lines are excluded from the date-based filtering and letting upsell lines use the base _get_invoice_lines method. OPW - 6213551 Steps to reproduce : [Video](https://drive.google.com/file/d/1px4J2oZJUtfBwIA_syQfdgXfRRg_6EBg/view?usp=drive_link) OPW - 6213551
This update fixes an issue where currency differences were incorrectly aggregated in hierarchical financial reports. Previously, the system was combining figures from different currencies, leading to inaccurate totals. This change ensures that reports accurately reflect the value of transactions in their original currency, improving the reliability of financial data.
Original PR description
opw-6015098