Daily updates from Odoo
Thursday, April 2, 2026
62 changes · saas-19.2
New functionality added to Odoo
This update adds tests to the Timesheet Dashboard feature, ensuring that the correct data is consistently loaded each time a user accesses the sheet. These tests enhance reliability and data accuracy for sales teams using the dashboard.
Original PR description
add tests for the timesheet dashboard sheet selection to ensure that the right sheet is loaded each time --- task-5956339
Resolved issues and error corrections
This update resolves a critical issue where the inventory valuation report crashed when processing large product catalogs (300k+). By optimizing how the report retrieves data, it now handles this scale efficiently without memory errors, significantly improving usability for businesses with extensive product inventories. The change reduces memory usage and processing time.
Original PR description
Behavior before: Opening the inventory valuation report on databases with 300k+ products (storable) caused an out-of-memory (OOM) error, making the report completely unusable at this scale. Behavior…
Behavior before: Opening the inventory valuation report on databases with 300k+ products (storable) caused an out-of-memory (OOM) error, making the report completely unusable at this scale. Behavior after: The inventory valuation report loads successfully and efficiently for 300k+ products without any memory errors or RAM spikes. Root Cause: In `_get_accounts_by_product()`, querying all storable products creates a massive recordset. When iterating through this recordset, the call to `_get_product_accounts()` accesses various relational and property fields (like categories and accounts). Because standard ORM prefetching was active, accessing these relational fields on the first loop iteration triggered a massive batch-fetch for all 300k+ products in the recordset simultaneously. This cascading prefetch overloaded the environment cache and caused an immediate OOM crash. Fix: Wrapped the `_get_accounts_by_product()` call in `with_context(prefetch_fields=False)`. This disables the greedy batch-loading behavior across the entire recordset. The ORM now fetches the required relational accounting fields surgically, record-by-record inside the loop, maintaining a minimal memory footprint and preventing the crash. Benchmark: | Products Count | Memory Before | Memory After | Time Before | Time After | |------------------------|-------------------------|----------------------|------------------- |----------------| | 300k+ | Memory Error | 1.1. GB | 46.63 s | 1.9 m | | 200k | Memory Error | 566.4 MB | 1.2 m | 1 m | | 100k | 873.1 MB | 286.8 MB | 36.74 s | 32.15 s | | 50k | 442.1 MB | 145.6 MB | 18.96 s | 17.65 s | opw-5462037 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#253331
This update fixes an issue where refund processing for invoices with identical product details would repeatedly match lines, leading to errors. The new algorithm now accurately matches refunds based on product, price, and quantity, ensuring correct credit note generation. This improves the reliability of refund processing for users.
Original PR description
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail because it would match the first matching line over and over again. Also, lines should not match based on line label, as it can be modified in the refund. This commit solves these 2 issues by 1) Preventing matching an invoice line more than once with refund lines 2) Preventing matching based on line label The new algorithm finds the best match for a refund line from the invoice lines with the following criteria: 1) same product 2) same unit price 3) same discount 4) invoiced quantity should be at least equal to the refunded quantity 5) invoice line should not be matched before 6) from the lines that match previous criteria, we pick the one with the minium quantity task-6004207 Forward-Port-Of: odoo/odoo#257158 Forward-Port-Of: odoo/odoo#252200
This update resolves an issue where line breaks added to quotation template section titles were being removed. The fix ensures section titles display correctly as intended, preventing users from needing to create new sections for multi-line titles. This improves the user experience when creating and managing quotation templates.
Original PR description
Steps to produce: --- - Install `Sales` module. - Go to `Sales > Configuration > Sales Orders > Quotation Templates`. - Create a new template and add a section. - In the section name, add text with…
Steps to produce: --- - Install `Sales` module. - Go to `Sales > Configuration > Sales Orders > Quotation Templates`. - Create a new template and add a section. - In the section name, add text with line breaks using `Shift + Enter`. - Go to sale orders > Create new SO > Set quotation template created above. Issue: --- - Line breaks entered in the quotation template section lines are stripped when the template is applied to a sale order. These intentional sections are meant to be single-line titles; users should create a new section instead of using line breaks within one. Root cause: --- - At [1], the `name` field is defined without the `section_and_note_text` widget. This widget is responsible for rendering section lines as a `CharField` instead of a `TextField`, as seen at [2]. Solution: --- - Add `widget="section_and_note_text"` to the `name` field. This ensures section lines consistently use `CharField`, preventing line breaks from being entered. [1]https://github.com/odoo/odoo/blob/951b44c0ed5ffb90cff6fa2934ca2664d2faa59d/addons/sale_management/views/sale_order_template_views.xml#L96 [2]https://github.com/odoo/odoo/blob/951b44c0ed5ffb90cff6fa2934ca2664d2faa59d/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_fields_backend.js#L79-L86 opw-6034255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256058
This update corrects a visual issue in the mass mailing builder where text styling (specifically using the 'text-muted' class) was inconsistently applied based on background colors. The fix ensures that the muted text style is always applied correctly, regardless of the background color used within the builder, resulting in a more polished and predictable user experience.
Original PR description
This commit fixes an issue with the `text-muted` class that gives a specific color to the text based on a background-color. Since the mass_mailing builder is a special case for background colors. The class now gives a specific color no matter what the background color is set when used inside the mass_mailing builder. task-5993139 Forward-Port-Of: odoo/odoo#252419
This update resolves an issue where link colors reverted to the default after using the website editor. The fix ensures that link colors remain as intended, regardless of whether the editor is open or closed, providing a consistent user experience for website content. This improves the visual quality and usability of our website.
Original PR description
Problem: Colored links revert to the default link color after saving and closing the website editor. Cause: The rule forcing links to inherit color from their parent `<font>` element is defined in the `html_editor` module, whose stylesheet is unloaded when the editor is closed, so the rule no longer applies on the frontend. Solution: Add the rule to `website_common.scss` so it applies on the frontend regardless of whether the editor is loaded. Steps to reproduce: 1. Open the website editor. 2. Apply Color to selection. 3. Apply link to the subset of the selection. 4. Save and close the editor. 5. Observe the link reverts to its default color. task-5980854 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256630 Forward-Port-Of: odoo/odoo#253301
This update corrects a visual issue where the table row menu was misaligned in websites using right-to-left (RTL) languages like Arabic. The fix ensures the menu's position is correctly calculated during editor initialization, resolving a display problem for users viewing the system in RTL layouts. This improves the overall user experience for international users.
Original PR description
Problem: In RTL websites, the table row menu is not placed correctly. Cause: The `inlineStartOffset` calculation in `table_menu` depends on the `direction` parameter, which was not passed during the…
Problem: In RTL websites, the table row menu is not placed correctly. Cause: The `inlineStartOffset` calculation in `table_menu` depends on the `direction` parameter, which was not passed during the editor initialization. Solution: Ensure the `direction` parameter is properly passed during editor initialization so the `inlineStartOffset` is computed correctly in RTL layouts. Before: <img width="1091" height="682" alt="image" src="https://github.com/user-attachments/assets/964903b2-d33b-48aa-86c2-632cc5adac9a" /> After: <img width="1093" height="658" alt="image" src="https://github.com/user-attachments/assets/846fd39c-1114-408d-a1f4-75b27218b9b0" /> Steps to reproduce: - Change website language to Arabic. - Add a text block and insert a table inside. - Hover over the first table row. - Observe the row menu is misplaced. opw-6049260 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256045
This update resolves a minor issue with the HTML editor's color selector, ensuring more consistent test results. Because the toolbar is a popover, it was susceptible to unpredictable behavior. This fix improves the reliability of the HTML editor's testing process.
Original PR description
The toolbar is a popover and is therefore affected by [1]. runbot-242071 [1] 54da715 Forward-Port-Of: odoo/odoo#256783
This update resolves an issue where searching for inactive accounts by their code didn't return results. The fix adjusts the search criteria to correctly include inactive accounts, ensuring accurate search functionality within the chart of account. This improves data accessibility and reporting.
Original PR description
# How to reproduce - Go to the chart of account - Archive any record (e.g. Code 101401) - Search with the filters : - Inactive Accounts - Account: 101401 (the code of the record) # The problem The…
# How to reproduce
- Go to the chart of account
- Archive any record (e.g. Code 101401)
- Search with the filters :
- Inactive Accounts
- Account: 101401 (the code of the record)
# The problem
The record that we searched for is not shown
# Cause
The domain for the "Account" filter is the following : https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/views/account_account_views.xml#L147
And this is the domain for "Inactive Accounts":
https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/views/account_account_views.xml#L159
This is correct and the search should return what we wanted, but the code's search is overriden by:
https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/models/account_account.py#L383-L384
And the search with the `code_store` domain only explicitely looks for accounts that are active, so our "[('active', '=', False)]" is essentialy ignored
This is fixed in 19.1 because this commit (https://github.com/odoo/odoo/commit/de959adf7c806e09864b52fec78d981e66804280) replaced the custom search by a `compute_sql`
# Proposed solution
We change the search with the `code_store` to look for records that are both active and inactive, since the active value will be handled by the parent search
opw-6059404
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#256939
Forward-Port-Of: odoo/odoo#256060This update fixes a crash that occurred when settling subscription orders through the Point of Sale (PoS) system. The issue stemmed from incorrectly processing discount lines, leading to a template error. The fix now correctly handles these discount lines as notes, ensuring smooth PoS transactions.
Original PR description
**Steps to reproduce:** - Make a subscription product - Make a quotation with it, confirm it, then invoice it - Go back to the sale order and upsell it - Add another product - Go to the PoS to settle the order - A traceback appears **Why the fix:** Why tried to treat the informative line that says that this is a discount as a normal pos order line. We then tried to access the line's template, which caused a crash as the line's template was undefined. We now treat the line as we do a note, meaning to add it to the previous line in the order. We create a function to check if the line is a note and we override it in the **pos_sale_subscription** module. Enterprise PR: https://github.com/odoo/enterprise/pull/107002 opw-5582448 Forward-Port-Of: odoo/odoo#256378 Forward-Port-Of: odoo/odoo#247846
This update corrects a technical issue that prevented snailmail reports from being sent correctly when users lacked sufficient access to company data. The fix now grants elevated access (sudo) to the IAP account, ensuring reports can be processed without errors. This improves the reliability of the snailmail feature.
Original PR description
Issue: Before this commit, when sending a follow up report by post, an access error is thrown if the user doesn't have enough access to read from res.company model Fix: Access the IAP account as sudo opw-6050041 Forward-Port-Of: odoo/odoo#255959 Forward-Port-Of: odoo/odoo#255431
This update corrects a minor issue in how Odoo identifies PDF files. Previously, the system was overly restrictive in recognizing PDF mimetypes, potentially causing problems with certain files. This change restores the ability to handle PDF mimetypes with optional parameters, ensuring broader compatibility and accurate file processing.
Original PR description
The structure of a MIME type commonly consists of just two parts: a type and a subtype, separated by a slash (`/`), but optionally it can also contains parameters to provide additional details (`type/subtype;parameter=value`). This commit restores this nuance in the PDF mimetype check that was made stricter in the commit odoo/odoo@b048078971f4f12307740a8b382b762a35983059. Reference: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types runbot-241165 Forward-Port-Of: odoo/odoo#256804
This update fixes an issue where purchase order descriptions weren't accurately displaying the correct vendor code and name. The underlying system logic was flawed, leading to inconsistent descriptions. The fix ensures that vendor details are consistently reflected in purchase order descriptions, improving order clarity and accuracy.
Original PR description
How to reproduce : - Create a product - Create an attribute with a value set to "free text" - Add 2 different vendors to the purchase tab of the product with different Vendor Code and/or Vendor Name…
How to reproduce : - Create a product - Create an attribute with a value set to "free text" - Add 2 different vendors to the purchase tab of the product with different Vendor Code and/or Vendor Name - Put Dropship as the route for the product to create a PO on a SO confirmation - Create a SO with that product - Confirm the SO and go to the PO - Change the vendor in the SO The problem : The Vendor Code and/or Vendor Name does not change correctly in the product description Why : The way the description generation for a change in a purchase order line works as follows : Create a collection of default descriptions based on the product and the different vendors. If the collection contains the current description, it means the description was not changed by the user and it can be modified. This is done to prevent resetting a custom description made by an user. This logic is pretty broken because the code that generate the description when going from a PO to a SO and the code that generate the description when changing the PO partner are different. This makes it so the current description is almost never found in the list of default descriptions. It looks tempting to try to "resynchronize" those part of the code so the description generation is the same in both cases. This would be done by overriding the _get_product_purchase_description method in the purchase_stock module and using the product_description_variants field. Sadly, this does not work because it conflicts with the purchase_product_matrix module and its own override of that method. The fix that I implemented checks that the Vendor Code and Name are the right one every time the description is computed following a change. opw-5888233 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256665 Forward-Port-Of: odoo/odoo#247330
This update fixes an error in the AVCO audit report that was miscalculating added value, leading to incorrect financial reporting. The change ensures the AVCO value is correctly updated based on the last incoming stock movement, improving the accuracy of inventory valuation. This resolves a discrepancy in reported values for purchases and deliveries.
Original PR description
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to…
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to recalculate the
`added_value`.
On the other hand, the `added_value` should not be recomputed from the AVCO value on ingoing moves.
Source of those changes: [245141](https://github.com/odoo/odoo/pull/245141)
Steps to reproduce the issue:
1. Create a new product. Do not assign it to a category yet.
2. Set the cost (standard_price) to 10$ on the product form.
3. Add 10 units to inventory.
4. Sell and deliver 5 units to a customer.
5. Purchase 10 units at 25$/ea and validate the receipt.
6. Sell and deliver 5 units to a customer.
7. Assign the product to category with AVCO cost method.
8. Go to the AVCO justification report:
- The added value on the purchase is incorrect: 200$ instead of 250$.
- On the last delivery: the added value is -125$ and the AVCO increases from 20$ to 25$.
Ticket: opw-5921104
Forward-Port-Of: odoo/odoo#252239This update resolves issues preventing users from correctly completing the mass mailing onboarding tour and fixes a display problem in the mass mailing builder. Specifically, the tour now guides users through the necessary steps, and text overflows in the builder are now properly wrapped for better readability.
Original PR description
## [FIX] mass_mailing: fix broken tour This commit fixes issues with the mass_mailing onboarding tour. The resolved issues are: * Subject tour step not properly handled: changed "click" to "edit" * Tour steps when theme is selected not shown: updated the trigger so that they are displayed. ## [FIX] mass_mailing: fix overlow-wrap This commit fixes an issue with the overflow-wrap behavior in the mass_mailing builder. By default the editor removes the overflow-wrap which sets its value to `normal`. This value makes it so that the text isn't wrapped if a word overflows the box its in. Now, the editable in the mass_mailing builder has the property set to `break-word` which is the wanted behavior. task-5974184 Forward-Port-Of: odoo/odoo#252405
This update fixes a labeling issue with the 0% VAT rate for sales outside the EU in Sweden. The tax name has been corrected to '0% EX RS' and linked to the appropriate grid, ensuring accurate reporting and compliance with Swedish tax regulations. This change improves the accuracy of financial data.
Original PR description
Currently, the tax for "VAT Sale of service outside EU 0%" has the 0% EU RS name and is associated with the se_39 grid. Since it is for outside the EU, it's name should be 0% EX RS and the grid should be se_40 opw-5798152 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256659 Forward-Port-Of: odoo/odoo#251750
This update resolves an issue where users would encounter access errors when creating private tasks. The fix ensures that a user is automatically added as a task follower upon creation, granting them necessary access rights regardless of the task's project association. This improves the usability of private task creation.
Original PR description
When users would follow the following step as they are makeing a private task, they would be hit by an incorrect access error. Steps to reproduce: 1.Open the form view to create a new task. 2.Clear…
When users would follow the following step as they are makeing a private task, they would be hit by an incorrect access error. Steps to reproduce: 1.Open the form view to create a new task. 2.Clear the Project field. When empty, it should display the Private placeholder. 3.Ensure no user is assigned to the task. 4.Create the private task. 5.An access rights error occurs, stating that the user does not have permission to create the record. ⚠️ Note: This access rights error only occurs when the task is created directly as private. If a task is created normally and then its project_id and user_ids are removed afterward, no access rights error occurs. Root cause: When a task is created without a project_id and without assigned users, Odoo checks access rights on creation. Since no project members or assigned users exist, no user has access to the record, including the creator. This results in an access rights error during creation. This issue does not occur when modifying an existing task because, after creation, the creator is automatically added as a follower. As a follower, the creator retains access to the task even if it has no project and no assigned users. Fix (implemented): Tasks that have no assigned users and are not linked to any project (private tasks) did not make sense, as they were effectively assigned to nothing. To address this, we now require at least one user to be assigned to a task when it is not attached to a project. This change was made inside of the "project_task_view.xml" file in the "view_task_form_2" record Versions : 17.0 -> master Task [5403926](https://www.odoo.com/odoo/project/4105/tasks/5403926) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257050 Forward-Port-Of: odoo/odoo#242216
This update enhances the accessibility of the website builder by ensuring option containers are properly navigable with the keyboard. The changes fix a previous issue where users couldn't easily expand or collapse option groups, and also adds a preview overlay when focus moves within options, improving the overall user experience.
Original PR description
Commit 64d35ccd6fade9e0473686b8484f561b5f4215ce added folding for groups of options when the user clicks on the name of the snippet above the group of option. This commit brings improvement to make it accessible: - use the `button` tag when the label can be clicked - use correct attributes for the arrow (no `role` and `aria-hidden`) Steps to reproduce: - Open website builder - Click on an element with options - Bugs: - The label is not focusable with the keyboard, so it's impossible to fold/unfold a container - The arrow icon should not have `role="img"` and it should have `aria-hidden="true"` (as it's just decorative) task-5993202
This update resolves a technical issue causing errors in the 'Actual Margins' report, specifically when generating reports for billable projects. The fix corrects a misconfiguration in the report's data access, ensuring the report functions reliably across both Enterprise and Community editions. This improves data accuracy and prevents disruptions for users generating these reports.
Original PR description
Steps to reproduce: - Bug 1: 1. Create a billable project linked to a Sales Order. 2. Invoice the Sales Order. 3. Open the "Actual Margins" report from the project. 4. Click a value in "Revenues (Fixed Price)". 5. Open a record from the list. - A traceback occurs with KeyError on account.analytic.line. Bug 2: 1. Open the "Actual Margins" report in Odoo Community edition. - It throws a traceback: "View type grid not found in act_window action". Cause: - Bug 1: In `action_open_account_analytic_line_origine`, the `res_model` in the action dict is set to a recordset instead of a model name string. Bug 2: The `grid` view type (Enterprise only) was incorrectly included in the `view_mode` field of the Community action. Fix: - Bug 1: Use `._name` to pass the model name instead of the recordset. Bug 2: Remove `grid` from `view_mode` as the Enterprise module already adds it via an `ir.actions.act_window.view` record. task-6085406
This update fixes an issue where URLs in emails were incorrectly encoded, potentially leading to display problems. The change utilizes modern URL handling techniques for accurate URL representation, ensuring correct links are displayed to users. This improves the reliability of email communications.
Original PR description
Before this commit, the URL was fully encoded using encodeUrl. This commit replaces this approach with the more modern [URL api](https://developer.mozilla.org/en-US/docs/Web/API/URL), which [handles encoding](https://url.spec.whatwg.org/#dom-url-href) properly. This commit also removes decodeUrl. It was possible for a user to send a URL and have a different one displayed in the UI due to decoding. Task-6041689 Forward-Port-Of: odoo/odoo#256850 Forward-Port-Of: odoo/odoo#254383
This update resolves an issue where users would encounter an error when attempting to save a report with an empty XML format. The fix prevents the system from attempting to process invalid XML data, ensuring reports can be saved correctly. This improves the user experience and prevents data corruption.
Original PR description
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External…
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External > Type Text in report - Save > Edit Sources > Remove full XML > Save Error: `XMLSyntaxError:Document is empty, line 1, column 1 (<string>, line 1)` This error occurs because line [1] in `web_editor` attempts to access nodes by using `etree.fromstring()` with an empty `view.arch`, which is empty, resulting in an error. In earlier versions, this error was already handled by the `_check_xml` constraint, which raised a validation error when an `etree.ParseError` occurred while parsing `etree.fromstring(view.arch)` with an empty `view.arch` (see code reference [2]). However, recent changes introduced in commit [3] allow `view.arch` to be empty. As a result, this error is no longer handled by the constraint. This commit fixes the issue by adding a condition to prevent calling `etree.fromstring()` when `view.arch` is empty, avoiding attempts to access nodes from invalid data. It also updates the logic in the `web_studio` module's `get_xml_editor_resources` method to ensure resources are processed only when a valid view architecture is available. [1]: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/web_editor/models/ir_ui_view.py#L367 [2]: https://github.com/odoo/odoo/blob/75ca0fec9a0d3b1e3a05a8bf3101bbe21846ac7a/odoo/addons/base/models/ir_ui_view.py#L372-L377 [3]: https://github.com/odoo/odoo/commit/8334ea5c777e5a478f12b8bb7a2f54bcae537d0f sentry-6288795955 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#256009 Forward-Port-Of: odoo/odoo#255316
This update fixes an issue where sale order prices weren't accurately reflecting the original, undiscounted amount, particularly when discounts were applied. The change ensures that the base price is calculated correctly, excluding any discount lines, leading to more precise order pricing and improved financial reporting. This resolves a previous bug reported by our team.
Original PR description
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#245246
This update resolves an issue where users couldn't close popups using the Escape key. The fix ensures the correct Bootstrap event handler is triggered, regardless of whether the popup contains interactive elements. This improves the user experience by providing a reliable way to close popups.
Original PR description
Steps to reproduce: =================== - Add a Popup snippet to a page - Remove all links/buttons inside the popup - Save and wait for the popup to appear - Press ESC -> Nothing happens. Cause:…
Steps to reproduce:
===================
- Add a Popup snippet to a page
- Remove all links/buttons inside the popup
- Save and wait for the popup to appear
- Press ESC
-> Nothing happens.
Cause:
======
https://github.com/odoo/odoo/blob/a922c31fa7ccd1107b31287ab1f75697fae874f8/addons/website/static/src/snippets/s_popup/000.js#L219-L226 when the popup contains no tabbable elements, `this.el.focus()` was called. `this.el` refers to the `.s_popup` div, not the `.modal` element that Bootstrap monitors for keyboard events. As a result, the ESC keydown event never reached Bootstrap's handler and the modal stayed open.
When focusable elements (links, buttons) were present, `tabableEls[0].focus()` correctly focused an element inside `.modal`, so ESC worked fine in that case.
Solution:
=========
Replace `this.el.focus()` with `this.el.querySelector(".modal").focus()` so focus lands on the `.modal` element allowing Bootstrap's built-in ESC handler to fire correctly in all cases
opw-5891054
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#254284
Forward-Port-Of: odoo/odoo#250050This update resolves several issues with the live chat transcript, ensuring that deleted messages are displayed correctly, attachments are shown, and guest avatars are accurate. The transcript size limit has also been removed, providing a better user experience. This improves the overall functionality and reliability of the live chat feature.
Original PR description
Before this commit, the live chat transcript had some issues: - Delete messages were shown as an empty bubble. - Attachments were not shown. - Guests avatar was incorrect. - Transcript was limited to 600px, while there is no reason to do so. This commit fixes all the above issues. task-6008968 ||| |-|-| |Before|| |After||
This update resolves an issue where marketing emails sent in RTL languages (like Arabic) were incorrectly rendered as left-to-right. The fix re-applies the correct language direction styling to ensure emails are displayed accurately, regardless of the user's language settings. This improves the user experience for international customers.
Original PR description
**Steps to reproduce:** - Install Mail Marketing app - Change user language to a RTL language (such as Arabic) - Create a marketing campaign with RTL content - Send it - Mail received changes from…
**Steps to reproduce:**
- Install Mail Marketing app
- Change user language to a RTL language (such as Arabic)
- Create a marketing campaign with RTL content
- Send it
- Mail received changes from RTL to LTR
**Issue:**
Conversion doesn't take into account the current
language direction anymore when creating the inline
styling. This keeps the mails in the default format ('ltr').
Previously the inline conversion was using the `/portal/static/src/scss/portal.scss`
to set the html body text direction using the `rtlcss` library:
```css
// Frontend general
body {
// Set frontend direction that will be flipped with
// rtlcss for right-to-left text direction.
direction: ltr;
}
```
It was used during the inline conversion in a `CSSStyleRule`
after loading the doc sheets, and added with the `.o_layout` selector:
```js
if (selector === "body") {
// The top element of a mailing has the class
// 'o_layout'. Give it the body's styles so they can
// trickle down.
cssRules.push({
selector: ".o_layout",
rawRule: subRule,
specificity: 1,
});
}
```
But recent refactor reworked the styling assets used by
this process, which removed this behavior.
**Fix:**
Keep style `direction` (instead of `dir` attribute) like
before, to avoid compatibility issues in mail engines.
This is done by reapplying the body rule on the
mass_mailing iframe styling, but it could also be manually
added to the fragment itself using the editor current config
or localization.
related: https://github.com/odoo/odoo/commit/354b8f60dbabcfac690d90bf657592e1347e4f86
opw-5982854
Forward-Port-Of: odoo/odoo#255628This update fixes an issue where URLs resembling phone numbers were incorrectly interpreted as phone links. The change strengthens the regex used to identify phone URLs, preventing unintended 'tel:' protocol additions. This ensures URLs are correctly linked to pages, improving user experience.
Original PR description
# How to reproduce - Add a new website page with a title that ressembles a phone number (3-14 does the trick even though it does not really look like a phone number) - Go to another page in edit mode…
# How to reproduce
- Add a new website page with a title that ressembles a phone number (3-14 does the trick even though it does not really look like a phone number)
- Go to another page in edit mode
- Select a button
- In the "Enter URL, /page, or #anchor" input, write the url to your page (/3-14)
- Click on Apply
# The problem
Instead of a link to our page, the button has a link with a tel: protocol.
# Cause
When clicking on the Apply button, the `applyDeducedUrl()` function will be run.
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/link_popover.js#L294
That function will change the selected url with the URL deduced from `deduceURLfromText()` if any is found. In our case "/3-14" matches the `PHONE_REGEX` pattern so the url is prefixed with the tel: protocol.
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/utils.js#L71
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/utils.js#L34
That regex is a bit too permissive and allows our "/3-14" to be matched even though it starts with "/".
Side note : cases like "( )", "...", "--)" are also a match, which is not really an issue because they do not really represent anyting but it shows that the regex is not strict enough.
# Proposed solutin
We edit the regex to make it so it only matches strings that have atleast a digit and where the first character (after "+") is a digit or "("
opw-6047571
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#255877This update resolves an issue where project users with limited access couldn't add customers to tasks, resulting in an access error. The fix involved a secure update to customer records and restricted editing permissions, ensuring all project users can now correctly associate customers with tasks.
Original PR description
Steps to Reproduce: - 1. Log in with a user having only Project > User access. 2. Create a new task in project. 3. Add a customer on the task. 4. Access error is raised. Issue: - - Project users could not create a task with a customer. - An access error appeared during task creation. Cause: - - When a customer was added to the task, the partner_phone inverse method was triggered. - This method attempted to write on the partner record. Solution: - - Added a check before writing to avoid unnecessary writes. - Used sudo() to update the partner phone securely. - Added view-level restriction using base.group_partner_manager to control who can edit the phone number. task-5039657 Forward-Port-Of: odoo/odoo#256921 Forward-Port-Of: odoo/odoo#252406
This update resolves an issue that occurred when users attempted to validate delivery records created with a sale order that lacked any order lines. The fix ensures a default sequence value of zero is used, preventing a 'max() arg is an empty sequence' error and allowing deliveries to be successfully validated. This improves the reliability of the sales order fulfillment process.
Original PR description
Currently, an error occurs when user validates a picking. **Steps to Reproduce:** - Install the `sale_management` and `sale_stock` modules. - Create a `sale order` without `any sale order lines` and…
Currently, an error occurs when user validates a picking. **Steps to Reproduce:** - Install the `sale_management` and `sale_stock` modules. - Create a `sale order` without `any sale order lines` and `confirm` it. - Go to `Inventory > Operations > Deliveries` and create a `picking record by adding a move line` with a `quantity` greater than `zero`. - In the `Additional tab`, select the `sale order (the one without order lines)`. - Now `validate` this delivery. **Error:** `ValueError: max() arg is an empty sequence` This error occurs because, during validation of the delivery record, the system attempts to `create a sale order line` for the product. If the sale order does not have any `existing order lines`, the system tries to determine the `sequence` from existing sale order lines. Since `no lines exist`, the `sequence list is empty` [1], raising the error. This commit ensures that when a sale order has no existing order lines, a default sequence value of zero is used. [1]- https://github.com/odoo/odoo/blob/9e404b52e8c9375a6534a67cfb0fcc0df523402b/addons/sale_stock/models/stock.py#L164 sentry-7089149997 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254803 Forward-Port-Of: odoo/odoo#239030
This update resolves an issue where public users were encountering errors using Apple/Google Pay with the Gelato add-on. The fix prevents Express Checkout from appearing in Gelato orders because the system requires email and street address information for accurate shipping cost calculations. This ensures a smoother checkout experience for Gelato customers.
Original PR description
Issue: --- Public users get error using Apple/Google pay with gelato. Steps to reproduce: --- 1- Setup gelato and stripe express checkout. 2- Using phone, in incognito mode, add a gelato product to cart. 3- Try express checkout. Cause: --- This is because email and street is not present in express checkout. While gelato needs these info to generate calculate shipping cost. Fix: --- We can prevent the express checkout to be shown in gelato orders. opw-5904177 Forward-Port-Of: odoo/odoo#256985 Forward-Port-Of: odoo/odoo#250443
This update resolves a problem where website assets wouldn't load correctly on replica Odoo instances after a theme change. The fix ensures that newly generated asset bundles are properly built from the primary instance, preventing errors when accessing these assets through readonly routes. This improves website functionality for users on replica instances.
Original PR description
When `/web/assets/...` is requested on a readonly route and the bundle is missing, Odoo regenerates it on the primary using a RW cursor. It can then still try to read the freshly created…
When `/web/assets/...` is requested on a readonly route and the bundle is missing, Odoo regenerates it on the primary using a RW cursor. It can then still try to read the freshly created `ir.attachment` through the original RO/replica env. In a primary/replica setup, replication may not have caught up yet, so the new attachment is not visible on the replica. As a result, readonly `/web/assets/...` requests can fail right after asset regeneration when fetching the freshly generated bundle. Steps to reproduce: 1. Configure Odoo with a PostgreSQL primary/replica setup. 2. Open a website in edit mode. 3. Trigger an asset regeneration (for example by changing a theme color). 4. Let the resulting readonly `/web/assets/...` request fetch the freshly generated bundle. Build the response stream from the RW env after regeneration instead of rereading the fresh attachment through the RO/replica env. opw-6034833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257189 Forward-Port-Of: odoo/odoo#255530
This update corrects a bug that prevented the correct display of amounts in words for Czech users. A temporary workaround was implemented, but will be removed automatically when Odoo uses a newer version of the `num2words` library with the necessary Czech language support. This ensures accurate financial reporting in Czech.
Original PR description
The `num2words` library has a bug in the language code they used for Czech (`cz` instead of `cs`). This commit adds a monkey patch to map the correct language code to the existing converter class, allowing the amount in words to work in Czech. The issue was fixed in version 0.5.14 of the library, so this patch can be removed once we use Ubuntu >= 25.10 (Python >= 3.13), that contains the fixed version of the library. [opw-6088697](https://www.odoo.com/odoo/project.task/6088697) Forward-Port-Of: odoo/odoo#257232 Forward-Port-Of: odoo/odoo#257031
This update resolves an issue where background images in mass email templates were not rendering correctly due to how Odoo handled HTML attribute quoting. The fix ensures background image URLs are properly converted to absolute paths, guaranteeing images display as intended across email clients. This improves the visual quality of mass email campaigns.
Original PR description
Problem: Background images in mass mailings were sent with relative URLs, resulting in broken images in email clients. Cause: When serializing, lxml will use single quotes for attribute values that contain double quotes, and double quotes for attribute values that contain single quotes or no quotes. It automatically picks the attribute delimiter to produce valid HTML, which explains why `style="..."..."`` becomes `style='..."..."'` after `tostring()`. Solution: Update the regex in `mail_render_mixin.py` to support both `"` and `'` delimited `style` attributes, ensuring background-image URLs are properly converted to absolute paths. Steps to reproduce: - Add any masonry snippet (with background image). - Send the email. - Observe the received email uses a relative image URL. opw-5974203 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254652
This update fixes an issue where shipping costs were incorrectly calculated when using combo products with delivery methods based on quantity. The fix ensures that shipping costs accurately reflect the quantity of individual components within a combo, preventing inflated shipping charges. This improves the accuracy of shipping calculations for customers using combo products.
Original PR description
**Issue:**
When using a delivery method that has a shipping cost based on the quantity of the product, the shipping cost is incorrect if there is a combo product. The quantity of the combo product was added to the total quantity of its components.
**How to reproduce:**
1. Create a delivery method based on rules.
2. Create a rule that uses the quantity (ex: 0$ + 5$ times the quantity)
3. Create a combo product
4. Create a sale order and add the combo product to it
5. Add the shipping
=> The shipping cost is incorrect
ex: With 1 combo choice, the shipping cost is doubled
**Fix:**
When calculating shipping cost, skip the sale order line of the combo product and only use the sale order lines of the components.
opw-6016209
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#256978
Forward-Port-Of: odoo/odoo#256055This update fixes a flaw in the website's leaderboard that incorrectly ranked users based on their recent activity. The change ensures users are accurately sorted by their current karma gain for the selected week or month, improving the user experience and data accuracy. This was achieved by pre-calculating karma gain at the database level.
Original PR description
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or…
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or "This Month"). The system would first retrieve users sorted by their *all-time* global karma, apply pagination (taking the top X users), and only then calculate the karma gain for the specific period for those few users. This caused users with high recent activity but low all-time karma to only be displayed much later in the page order than they should. This commit fixes the issue by introducing a pre-search step that calculates the karma gain for the requested period at the database level. Pagination is now applied to this specific result set, ensuring users are correctly ranked by their actual performance during that week or month. Note: A new method `_get_users_by_tracking_karma_gain` was added to `res.users` to handle this logic. This approach was chosen to strictly preserve the signature of existing methods for the stable version. A distinct refactor to unify these calculation methods is planned for the master branch. Steps to reproduce: - Install the eLearning module. - Create a few users with different karma_points (more than 25 to have 2 pages). - Go to /profile/users. - Group by week. - Paginate, and you will notice that the order is wrong; the first user on the second page might have more points than users on the first page. Also, when the logged-in user is not on that page, they do not appear at the bottom. task-5344657 opw-3979785 Forward-Port-Of: odoo/odoo#257210 Forward-Port-Of: odoo/odoo#176626
This update fixes an issue where kit products were incorrectly reporting the full sales price of each component within delivery DDTs. Previously, the report showed individual item values instead of the total kit value. This change ensures accurate reporting of kit component values, improving the clarity and reliability of delivery documentation for IT companies and other kit-based sales.
Original PR description
Steps to reproduce: - Have an IT company setup - Create a product with a Sales Price and define a kit BOM with 2 components - Create SO with product - Confirm, go to delivery, validate - Print Issue: In the delivery DDT, there is a summary of the delivery where each item has its own entry (product, quantity, value). However, in case of kit BOM, each component is reported with the full value of the sale operation. Analysis: This occurs because in the report code we don't consider the possibility of kit products, where multiple components are associated to the same sale line. Ticket [link](https://www.odoo.com/odoo/project.task/5013606) opw-5013606 Forward-Port-Of: odoo/odoo#256288 Forward-Port-Of: odoo/odoo#224103
This update resolves an issue where virtual keyboards unexpectedly appeared on touch devices when opening dialogs. The change ensures that focus is correctly placed within the dialog, preventing the keyboard from triggering while maintaining the expected functionality.
Original PR description
Commit 1 addressed an issue where the virtual keyboard would pop up unexpectedly when navigating on touch devices. However, due to commit 2, opening a dialog traps the focus in the dialog and automatically focuses on the first element. On touch screens, this behavior triggers the virtual keyboard. This commit changes the behavior so that, on touch devices, the focus is on the main part of the dialog instead of the first input field. This prevents the virtual keyboard from opening while ensuring the focus trap remains active. opw-5970020 1: https://github.com/odoo/odoo/commit/9d8f9d90743490c37a89fa71be087d38924164e7 2: https://github.com/odoo/odoo/commit/cd624c891f356c0527f5bb75cdfe1e05b7b79a21 Forward-Port-Of: odoo/odoo#257120 Forward-Port-Of: odoo/odoo#256880
This update resolves a technical issue causing excessive memory usage in the account reports module. The fix ensures that report preloading stops when the component is destroyed, preventing a memory buildup that could impact performance. This improves the stability and responsiveness of the account reporting feature.
Original PR description
The preloading of sections would never stop, this is an issue since this would prevent the garbage collector from collecting this big class and all it's objects. We fix this by making sure to stop the reploading when the component is destroyed. It's important to do it this way rather than clearing the timeout as the destruction could happened when the report is loading so the timeout would be unset and a new one would be started. Forward-Port-Of: odoo/enterprise#112810 Forward-Port-Of: odoo/enterprise#112628
This update resolves a technical issue that was causing platform order flow tests to fail due to a missing POS printer in the test environment. The fix ensures that tests can complete successfully without crashing, improving the reliability of our automated testing process.
Original PR description
When running platform order flow tests, calling `mark_platform_prep_order_as_printed` raises a ValueError because the test environment lacks active POS printers (they are unlinked during setup). This commit patches the method to catch the ValueError and return False, allowing the POS tours to complete successfully without crashing. build_error-241260 Forward-Port-Of: odoo/enterprise#111076
This update fixes an issue where Belgian VAT return PDFs were not including essential fields like 'Ask Restitution' and 'Client Nihil'. The fix ensures these fields are correctly generated when submitting a VAT return, guaranteeing accurate reporting for our Belgian customers. This resolves a previous reporting discrepancy.
Original PR description
When submitting a Belgian VAT return, the PDF attachment was generated without 'l10n_be_closing_vat_return', 'ask_restitution', and 'client_nihil' in the options. The wizard called _proceed_with_locking() without options_to_inject, so when export_to_pdf() rebuilt options via get_options(), _custom_options_initializer() read those keys from previous_options as None, making <t t-if="options.get( 'l10n_be_closing_vat_return')"> always False. Steps to reproduce: 1. Create a Belgian company 2. Navigate to Accounting -> Accounting -> Tax Returns 3. Create a VAT Return, fill in "Ask Restitution", and validate it 4. Submit the VAT return 5. Open the generated PDF attachment => "Ask Restitution" and "Client Nihil" fields are missing from the header Ticket [link](https://www.odoo.com/odoo/project.task/5509725) opw-5509725 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#110537
This update fixes an error in the Mod 347 BOE export that was using incorrect indicators for 'Substitutive' and 'Complementary Declarations'. The change ensures the file is correctly recognized by the Spanish tax authority (AEAT), preventing misinterpretation of the data and ensuring accurate reporting. This resolves a potential issue with submitting tax returns.
Original PR description
Currently, the BOE export for `Mod 347` uses incorrect indicators for `Substitutive` and `Complementary declarations`. **Steps to reproduce:** - Install the `l10n_es_reports` module and switch to the…
Currently, the BOE export for `Mod 347` uses incorrect indicators for `Substitutive` and `Complementary declarations`. **Steps to reproduce:** - Install the `l10n_es_reports` module and switch to the `ES company` - Navigate to Accounting > Reporting > Tax Report - From the smart button, select `Report: Tax Report (Mod 347) (ES)` - Download the BOE file using the dropdown. - In the wizard: - Enable `Substitutive Declaration` or `Complementary Declaration` - Set `Previous Report Number` (e.g., 123456789) - Click `Generate BOE` - Upload the generated .txt file to the `AEAT portal`. (AEAT credentials are required) **Observation:** AEAT does not recognize 'X' as a valid indicator for substitutive or complementary declarations and interprets the file as a standard return. **Root Cause:** At [1], the BOE Mod 347 generation writes 'X' for both substitute and complementary declarations. **Fix:** This commit ensures the file contains correct indicators: - 'C' for `complementary declarations` - 'S' for `substitute declarations` This aligns Modelo 347 with AEAT specifications and ensures consistency with the implementation of Modelo 349 at [2]. Ref: https://sede.agenciatributaria.gob.es/Sede/en_gb/ayuda/consultas-informaticas/declaraciones-informativas-ayuda-tecnica/modificar-declaracion-informativa-mediante-fichero.html [1]: https://github.com/odoo/enterprise/blob/c5332bef593cc3fa1b5013a0dac56ccd67e4da14/l10n_es_reports/models/aeat_tax_reports.py#L1061-L1062 [2]: https://github.com/odoo/enterprise/blob/c5332bef593cc3fa1b5013a0dac56ccd67e4da14/l10n_es_reports/models/aeat_tax_reports.py#L1490-L1491 opw-6048711 Forward-Port-Of: odoo/enterprise#112818 Forward-Port-Of: odoo/enterprise#112566
This update fixes a display issue where subscription product billing periods weren't shown in product snippets on the website. The fix ensures that all subscription products, regardless of where they're displayed (shop page or snippet), accurately show their billing periods. This improves the clarity and accuracy of product information for customers.
Original PR description
Steps to reproduce: 1) Go to the Website app. 2) Add a product snippet to any page using the editor. 3) See product card of any subscription product. Issue: - The billing period is not displayed for subscription products in the product snippet, unlike on the shop page. Cause: - `temporal_unit_display` is not included in the `combination_info`which is passed in data used by the product snippet. Fix: - Include `temporal_unit_display` in `combination_info`. opw-6070943 Forward-Port-Of: odoo/enterprise#112787 Forward-Port-Of: odoo/enterprise#112171
This update resolves a test failure caused by demo data incorrectly influencing article sequence numbers. The test now dynamically calculates the expected sequence number, ensuring consistent results regardless of whether demo data is enabled. This improves test reliability and stability.
Original PR description
In the `test_article_create` test, a new article is created without specifying a parent and sequence number. The test then asserts the sequence number assigned to this article using a constant. When…
In the `test_article_create` test, a new article is created without specifying a parent and sequence number. The test then asserts the sequence number assigned to this article using a constant. When no sequence number is provided, the system automatically assigns one by taking the highest existing sequence among articles with the same parent and incrementing it by 1. When demo data is enabled, additional users are created along with their corresponding onboarding articles. As the onboarding articles does not have any parent, the onboarding article are included in the computation of the sequence number of the new article we create in the test. These extra articles impacts the sequence number of the new article, causing the test assertion to fail. To resolve this, the test computes the expected sequence number dynamically based on the current state of the data. This ensures consistent behavior regardless of whether demo data is present. runbot-error-id~231695 Forward-Port-Of: odoo/enterprise#106326
This update corrects a previous issue where partner totals were incorrectly hidden, regardless of their value. Now, all partners with totals exceeding €3,005.06 are displayed, and insurance operations accurately track sales and purchase journal amounts, providing a more complete financial picture.
Original PR description
Before this PR: - Partners were only shown if their total was positive and above 3,005.06 €. Negative totals were hidden, even if they were lower than -3,005.06 €. - Insurance operations only took Purchase journal amounts into account. Amounts from Sales journals were ignored, and there was no distinction between the two types of operations. After this PR: - The report now uses the absolute value of the total. Partners with amounts exceeding 3,005.06 €, whether positive or negative, are now shown correctly. - Insurance operations are now divided into two distinct sections: Sales and Purchases. Amounts from both Sales and Purchase journals are now correctly taken into account and reported in their respective sections. task-5214023 Forward-Port-Of: odoo/enterprise#112735 Forward-Port-Of: odoo/enterprise#100413
This update resolves an issue where users were incorrectly added as followers of chatter threads, leading to unwanted notifications. The fix ensures the correct user ID is used, preventing this unintended behavior. Additionally, a cron job issue was addressed to ensure all records are processed correctly.
Original PR description
The method call that is supposed to subscribe the current user to the closing entry when posting XBLR used the User id as a Contact id. This caused random contacts to be added as followers of the chatter thread and as a result receiving notifications for it. The fix is simply using the id of the User's Contact instead. Also, as discussed with prro on Discord, fixed the cron clearing its dictionary each loop. opw-5886621 Forward-Port-Of: odoo/enterprise#112709 Forward-Port-Of: odoo/enterprise#107843
This update fixes a previous issue where planned actions (like Dimona/Part Time) were incorrectly triggered for new employees across all countries. Now, these actions are specifically applied only to employees with Belgian contracts, ensuring accurate payroll processing and compliance with Belgian regulations. This change improves the reliability of HR processes for our Belgian clients.
Original PR description
Previously, planned actions (Dimona/Part Time) were triggered for all new employees with a contract start date, regardless of country. Now, the trigger is filtered to only apply to Belgian contracts. task-5942339 Forward-Port-Of: odoo/enterprise#111788
This update resolves an issue where subscription discounts weren't being correctly processed during sales order imports. The change modifies how the system handles subscription discounts, ensuring they are accurately reflected in sales data. This improves the reliability of subscription-based sales reporting.
Original PR description
This is a test for the related community fix and an override of the **isSaleOrderLineNote** method to add the subscription specific **subscription_discount** lines to be treated as a note when importing it from the Sales module. https://github.com/odoo/odoo/pull/247846 opw-5582448 Forward-Port-Of: odoo/enterprise#112326 Forward-Port-Of: odoo/enterprise#107002
This update resolves a problem where the 'Reconcile' button was incorrectly displayed on mobile devices after a bank statement line was fully reconciled, causing errors. The fix ensures that the button is hidden when a line is reconciled, and displays the correct reconciliation information, improving the mobile user experience.
Original PR description
Currently, when a line is fully reconciled, we display all the moves, name of the reconciliation, and we hide the `Reconcile`, `Set Partner`, ... buttons, has the line is reconciled, we don't need the buttons. But in mobile, we still display the buttons (like `Reconcile`), leading to a traceback when clicking on it. Furthermore, instead of showing the moves name, we show a `[object Object]`. This bug was probably introduced here: https://github.com/odoo/enterprise/pull/101692 task-6058911 Forward-Port-Of: odoo/enterprise#111605
This update resolves an issue where adding recurring prices to subscription products with multiple companies resulted in an error and prevented recurring plans with a company set from appearing in the list. The fix ensures that product pricelist items correctly handle company IDs, allowing users to manage recurring plans across different companies without encountering errors.
Original PR description
## Issues When adding a line in the *Recurring prices* tab (`product.pricelist.item`) of a product with a `company_id`, a "company inconsistencies" error appears. Also, recurring plans with their…
## Issues When adding a line in the *Recurring prices* tab (`product.pricelist.item`) of a product with a `company_id`, a "company inconsistencies" error appears. Also, recurring plans with their *Company* field set do not appear in the list of recurring plans when adding a line in the *Recurring prices* tab. ## Steps to reproduce 1. Install *Subscription* (`sale_subscription`) 2. Create a second company 3. Create a subscription product and set a company in the *Company* field (`company_id`). 4. In the *Recurring prices* tab, add a line (any recurring plan, any price) 5. **An _Invalid Operation_ error appears: _"Uh-oh! You’ve got some company inconsistencies here"_** For the second issue, after the same 3 first steps: 1. Create a *Recurring Plan* RP with its *Company* field set to the current company 2. On the *Recurring prices* tab of the subscription product, try to add a line with the Recurring plan RP 3. **The Recurring plan RP is missing from the list of available plans.** ## Cause When adding a line to the *Recurring prices* tab, a new `product.pricelist.item` is created, with no `pricelist_id`. The `ProductPricelistItem._compute_company_id` from `sale_subscription` filters out the items that don't have a `pricelist_id`, which is the case for the line we create. Also, the (potentially new) plan has no `company_id` in most cases. https://github.com/odoo/enterprise/blob/ccab0c261040ed995d12dca891caae9596bbe1eb/sale_subscription/models/product_pricelist_item.py#L18-L26 By filtering the items with no `pricelist_id`, nothing is passed to the `super()._compute_company_id`, even though it would also handle cases where the item has a `product_tmpl_id`: https://github.com/odoo/odoo/blob/9c8112d794af1ba84ade8af124967495c2ff8995/addons/product/models/product_pricelist_item.py#L170-L173 opw-5981629 opw-6051978 Forward-Port-Of: odoo/enterprise#109403
This update resolves an issue where tests for Italian tax reports were failing due to missing data required for XML validation. The changes ensure the tests now properly populate the necessary 'codice fiscale' field, allowing the validation process to complete successfully. This improves the reliability of the tax report generation process.
Original PR description
Description of the issue this commit addresses: Previously, the testing of the xml exports was only done by generating the file and checking its content against a hardcoded one but a fix[^1] changed that so the tests use the real export flow during which an xsd validation is done. As the tests did not expect to go trough the validation, some mandatory values were not present and it now results in a failing validation (caught in except). [^1]: https://github.com/odoo/enterprise/pull/108548 Desired behavior after this commit is merged: The tests set the l10n_it_codice_fiscale field from which are populated the mandatory CodiceFiscaleDichiarante, CodiceFiscale and CFDichiarante for the xsd validation. opw-5707544 Forward-Port-Of: odoo/enterprise#112629
This update resolves an issue where planning users couldn't update customer phone numbers within planning slots. The fix involved implementing security controls – specifically, restricting access and using secure update methods – to prevent errors and ensure data integrity. This ensures planning users can correctly manage customer information.
Original PR description
Steps to Reproduce: - 1. Log in with a user having only "Planning > User" access. 2. Create a new planning slot. 3. Add a customer on the slot whose partner is linked to a res.users account. 4. Access error is raised. Issue: - - Planning users could not update the partner phone on a slot. - An access error appeared when updating the phone number. Cause:- - - When a customer was added to the slot, the partner_phone inverse method was triggered. - This method attempted to write on the partner record. Solution: - - Added a check before writing to avoid unnecessary writes. - Used sudo() to update the partner phone securely. - Added view-level restriction using base.group_partner_manager to control who can edit the phone number. task-5039657 Forward-Port-Of: odoo/enterprise#112650 Forward-Port-Of: odoo/enterprise#93969
This update corrects a bug that allowed users to incorrectly change the 'Recurring' status of subscription products with existing sales orders. The fix ensures that changes are reverted properly, preventing data inconsistencies and maintaining accurate subscription management. This improves data reliability and user trust.
Original PR description
**Problem:** When attempting to change "Recurring" on products in the form view, if there are confirmed SOs, the change should be reverted and a message should appear explaining this. However, there is a bug in how the change is reverted where it takes the current form value of the field. This cannot be trusted as it's possible to trigger another onchange before the first one resolves, so the second onchange is based on the wrong value. **Steps to Reproduce:** - w/Demo Data, go to product "Office Cleaning Service (SUB)" (This is a subscription product which has confirmed SOs) - Quickly click the checkbox for "Recurring" twice -> Two warnings appear, but Recurring is False and can be saved **Solution:** Instead of reading the current form value and setting its opposite, we can revert to the current value on the server. Forward-Port-Of: odoo/enterprise#111725 Forward-Port-Of: odoo/enterprise#110877
This update clarifies the description of the `esg.activity.type` model to explicitly state its use within the ESG reporting framework. Previously, the description was identical to the general `activity.type` model, which could cause confusion. This change ensures clarity and proper tracking of ESG-related activities.
Original PR description
Before this commit, the description of `esg.activity.type` model is the same than the `activity.type` one defined model which could be confusing. This commit updates the description of `esg.activity.type` model to set Activity Type ESG to explicitly mention that model is used in ESG. Forward-Port-Of: odoo/enterprise#112680
This update resolves an issue where confirming quantities of archived products through the barcode app would trigger an error. The fix ensures that archived products are included in search results, allowing users to accurately add and confirm quantities, maintaining consistent functionality.
Original PR description
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to…
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to Settings and enable Multi-Step Routes > Set Warehouse Routes. - Configure 2 steps for outgoing shipments. - Go to Inventory and create a new delivery with - **Source Location:** WH/Stock - **Product:** [E-COM10] Pedal Bin with demand 1 - Mark as Todo then Archive the Pedal Bin product. - Open that delivery in barcode app - Pencil icon > +1 > Confirm ## Observed behavior: TypeError: Cannot read properties of undefined (reading 'qty_available') ## Root cause: After this [commit], an override was added to the product selector. As a result, when [2] calls the `search_read` method, it only retrieves non-archived products Consequently, if the result is an empty array, attempting to access `qty_available` causes the type error mentioned above. ## Solution: Adding` active_test = false `to the context ensures that archived products are included in search results. This prevents empty results and avoids the error. It also allows quantities to be added and confirmed,maintaining the same behavior as when using the increment button followed by validation, ensuring consistency. [commit]: https://github.com/odoo/enterprise/commit/6aa814f59f8641d7b57af160e38b50d5bdfc8a97 [2]- https://github.com/odoo/enterprise/blob/e13b44b353e734a6533f7d627ed69b6e7b033ee2/stock_barcode/static/src/js/stock_barcode_sml_form.js#L40-L45 opw-5980428 Forward-Port-Of: odoo/enterprise#112616 Forward-Port-Of: odoo/enterprise#109204
This update resolves an issue that prevented the General Ledger consolidation feature from functioning correctly when multiple companies were selected. The fix ensures the consolidation process now works reliably, allowing users to accurately combine financial data across different companies. This improves the stability and usability of a key reporting tool.
Original PR description
### Issue before this commit: When opening the General Ledger consolidation with multiple companies selected, a traceback was displayed with a KeyError: 'account_code'. ### Steps to reproduce the…
### Issue before this commit: When opening the General Ledger consolidation with multiple companies selected, a traceback was displayed with a KeyError: 'account_code'. ### Steps to reproduce the issue: 1. Select two or more companies from multi company menu 2. Accounting / Reporting / Ledgers / General Ledger 3. Posted Entries, Accrual Basis button 4. Pick Consolidation 5. Error ### Cause of the issue: When more than one company is selected, the General Ledger consolidation groups journal entries by multiple parameters in an increasingly strict hierarchy. One of these parameters is account_code, which is required only in a multi-company context (as account_id alone is sufficient when a single company is selected). However, the SQL query was not properly adapted to handle this case. The account_code field was used as a grouping key but was not retrieved from the database, resulting in a KeyError. ### Reason to introduce the fix: To ensure that the General Ledger consolidation can be correctly displayed in a multi-company context and to prevent runtime errors. opw-5933074 Forward-Port-Of: odoo/enterprise#112567 Forward-Port-Of: odoo/enterprise#109036
This update resolves an issue where subscription products with a zero sales price couldn't be added to the cart when the 'Prevent Sale of Zero Priced Product' setting was enabled. The fix ensures the system correctly uses the selected subscription plan to determine if the product can be added, improving the user experience for subscription purchases.
Original PR description
A subscription product that has a price of zero on the product form and the price is set on the pricelist instead cannot be added to the cart when the `Prevent Sale of Zero Priced Product` setting is…
A subscription product that has a price of zero on the product form and the price is set on the pricelist instead cannot be added to the cart when the `Prevent Sale of Zero Priced Product` setting is enabled Steps to reproduce: 1. Install eCommerce and Subscriptions 2. Go to Settings and enable `Prevent Sale of Zero Priced Product` 3. Go to Subscriptions > Products and create a new product "subscription" with Sales Price $0.00 and publish it to the website 4. Go to Subscriptions > Pricelists and edit pricelist "Benelux" 5. In the Recurring Prices tab, create a new entry for product "subscription" with a Fixed Price of $20.00 and a monthly Recurring Plan 6. Log in as portal user, go to the shop and look for "subscription" (pricelist "Benelux" should be selected) 7. Try to add it to the cart 8. Nothing happens and an error is displayed in the log Issue: When we check if a product can be added to the cart https://github.com/odoo/odoo/blob/b1f4647313eb2dbdbbe98b51649604b4e650a8aa/addons/website_sale/controllers/cart.py#L116-L120 we do not use the plan_id specified in kwargs We reach this code https://github.com/odoo/odoo/blob/b1f4647313eb2dbdbbe98b51649604b4e650a8aa/addons/website_sale/models/product_product.py#L146-L147 which will prevent the addition of a product in the cart if the option `prevent_zero_price_sale` is enabled and if `_get_contextual_price` returns zero Calling `_get_contextual_price` tries to find a `product.pricelist.item` by building a domain in `_get_applicable_rules_domain` but calling this method without a plan_id eventually reaches https://github.com/odoo/enterprise/blob/252c5ab78b51d0d2f06178cf92f0489b4a46958f/sale_subscription/models/product_pricelist.py#L69-L72 which restricts the domain to pricelists that are not subscription plans Therefore, we cannot find any pricelist that applies to the product and we consider that the product cannot be added to the cart Solution: We need to use the plan_id selected by the customer in order to correctly check if a product can be added to the cart. Use the plan_id in kwargs to update the request context so we can check if a product can be added to the cart according to the plan_id the user has selected. Use this plan_id in `_get_applicable_rules` in order to correctly select the applicable `product.pricelist.item`. opw-5993614 Forward-Port-Of: odoo/enterprise#111624
A validation error during offer generation was caused by a recent requirement for a 'version_id' field. This update ensures the system correctly processes offer generation by automatically providing the necessary 'version_id' information. This resolves a potential issue preventing successful offer creation.
Original PR description
-**ISSUE**: Since the "version_id" field in hr.payslip.worked.days model became a required field, the validation error exists. -**FIX**: "version_id" is passed inside the salary simulation payslip.
This update corrects a duplicate shortcut issue within the Assets view in the Odoo Enterprise software. The ALT + P shortcut, previously causing a conflict, has been resolved. This ensures users can consistently utilize the intended functionality for managing assets.
Original PR description
This PR (https://github.com/odoo/enterprise/pull/109022) fixed the duplicate ALT + P shortcut in the Assets view. A new one was added in 19.2. opw-5948523
This update resolves an issue where saving a report with an empty XML format in Web Studio would generate an error. The fix prevents the system from attempting to process empty XML data, ensuring a smoother user experience. This improves report creation stability.
Original PR description
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External…
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External > Type Text in report - Save > Edit Sources > Remove full XML > Save Error: `XMLSyntaxError:Document is empty, line 1, column 1 (<string>, line 1)` This error occurs because line [1] in `web_editor` attempts to access nodes by using `etree.fromstring()` with an empty `view.arch`, which is empty, resulting in an error. In earlier versions, this error was already handled by the `_check_xml` constraint, which raised a validation error when an `etree.ParseError` occurred while parsing `etree.fromstring(view.arch)` with an empty `view.arch` (see code reference [2]). However, recent changes introduced in commit [3] allow `view.arch` to be empty. As a result, this error is no longer handled by the constraint. This commit fixes the issue by adding a condition to prevent calling `etree.fromstring()` when `view.arch` is empty, avoiding attempts to access nodes from invalid data. It also updates the logic in the `web_studio` module's `get_xml_editor_resources` method to ensure resources are processed only when a valid view architecture is available. [1]: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/web_editor/models/ir_ui_view.py#L367 [2]: https://github.com/odoo/odoo/blob/75ca0fec9a0d3b1e3a05a8bf3101bbe21846ac7a/odoo/addons/base/models/ir_ui_view.py#L372-L377 [3]: https://github.com/odoo/odoo/commit/8334ea5c777e5a478f12b8bb7a2f54bcae537d0f sentry-6288795955 Forward-Port-Of: odoo/enterprise#112111 Forward-Port-Of: odoo/enterprise#88613
A recent update caused partner names in the approval request report to overflow, making the report visually unclear. This fix addresses this issue by limiting the field width for partner names in the report, ensuring all data is displayed correctly. This improves the report's readability and accuracy.
Original PR description
step to reproduce: - install "approval" with demo data - have a partner with name length > 63 - open one of the approvals and change its type to "general approval" - add this partner in contact field - print approval request report Observation: - the partner overflows out of report Fix: - we limit the partner field with `col-9`. For a safe measure i have added `col-9` for `request_owner_id` and `approver_ids` **Before** <img width="1057" height="326" alt="image" src="https://github.com/user-attachments/assets/a8eea789-5cc7-4658-88b5-78751759d043" /> **After** <img width="994" height="330" alt="image" src="https://github.com/user-attachments/assets/bfbc061b-a6e0-4593-a3cc-c85cb81db6e2" /> opw-6005752 Forward-Port-Of: odoo/enterprise#111130
This update resolves an issue where removing an EPD line in the bank rec widget incorrectly removed associated invoice lines with tax. Now, only the EPD line and its corresponding tax line are properly removed, ensuring accurate bank reconciliation reporting. This improves data integrity and reduces potential reporting errors.
Original PR description
When removing an EPD line in the bank rec widget, if the invoice line added to the statement line contained a tax, the invoice line was removed aswell. Now, only the EPD line and its tax line are removed. no-task Forward-Port-Of: odoo/enterprise#110669 Forward-Port-Of: odoo/enterprise#110514
Features or functions removed from Odoo
This update removes restrictions on which country codes can be used when registering PEPPOL accounts within Odoo. Previously, registration was limited to numbers on a specific list. Now, businesses can register PEPPOL accounts from a wider range of countries, increasing flexibility and access to the PEPPOL network.
Original PR description
Before this commit, only numbers on the peppol list were able to be registered. Now is possible to add numbers from other countries. Task-6033336 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254373
Documentation and clarification updates
This pull request updates the contributor list in the Optesis documentation to reflect the correct name, Ibrahima NIASSE EXT, for a key contributor. This ensures accurate records and proper recognition of individuals involved in the project. The change was made to align with the latest contributor details.
Original PR description
Replaced Mame Abdoul Aziz SY with Ibrahima NIASSE EXT in the contributors list. 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#256563