Daily updates from Odoo
Thursday, April 2, 2026
305 changes
22 changes
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#25005024 changes
Resolved issues and error corrections
This update resolves a critical issue where the inventory valuation report crashed when processing large product catalogs (over 300,000 products). By optimizing how the report accesses product data, it now loads reliably and efficiently, even with extensive product listings. This ensures the report is usable for all businesses.
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 lines weren't correctly matching with invoices, leading to potential errors when processing refunds. The new algorithm now prioritizes matching based on product, price, and quantity, ensuring accurate refund calculations. This improves the reliability of the refund process 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 corrects 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 usability of 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 problem where receipts generated for multiple point-of-sale orders were incorrectly referencing the same QR code. The fix ensures that each order receives a unique QR code, preventing errors and improving the accuracy of printed receipts. This resolves an issue impacting the l10n_es_edi_verifactu_pos module.
Original PR description
**Step to reproduce:** - install "l10n_es_edi_verifactu_pos" - setup "ePOS printer" for a pos - open pos and settle a order below 400$ - notice we get l10n_es_edi_verifactu_qr_code in our receipt -…
**Step to reproduce:** - install "l10n_es_edi_verifactu_pos" - setup "ePOS printer" for a pos - open pos and settle a order below 400$ - notice we get l10n_es_edi_verifactu_qr_code in our receipt - click on "Print receipt" - repeat above steps for one more order **Observation:** - when we print the second order receipt, the QR still points to 1 order invoice **Issue:** - [getCacheKey](https://github.com/odoo/odoo/blob/0cee3350df09b06af77c879f0eba74bf6a8dd2c9/addons/point_of_sale/static/src/app/utils/html-to-image.js#L351C10-L355 ) was trimming query strings when generating cache keys. URLs like: ` http://localhost:9000/report/barcode/?barcode_type=QR&value=... ` were reduced to: ` http://localhost:9000/report/barcode/` - As a result, different QR code requests shared the same cache key. Subsequent requests reused the previously cached image instead of fetching a new one, producing incorrect QR codes for different orders. **Solution:** Add an `includeQueryParams` flag to `resourceToDataURL` so the full URL, including query parameters, is used as the cache key when needed. This ensures unique QR code URLs are cached and fetched correctly. opw-5455807 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#251139
This update resolves an issue where the 'text-muted' color in the mass mailing builder was inconsistently applied based on background colors. The fix ensures a consistent muted color is always used, improving the visual appearance and usability of the mass mailing builder.
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 colored links reverted to the default color after using the website editor and saving changes. The fix ensures that link colors remain consistent regardless of whether the editor is open or closed, improving the user experience for website content creation.
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 is positioned correctly by properly setting the layout direction during editor initialization. This improves the user experience for all language versions.
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 fixes an issue where boolean settings linked to configuration parameters were incorrectly interpreted as 'False' in the system. The change ensures that string values like "False" are correctly parsed as boolean values ('False') when setting configuration options, preventing unexpected behavior and ensuring accurate settings are displayed. This improves the reliability of configuration settings.
Original PR description
When a boolean field on `res.config.setting` tied to `ir.config_parameter` via `config_param` attribute, the value is incorrectly parse as param store `False` as `"False"` and later being shown as `True` on the setting form. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257033
This update fixes a usability issue where the 'Add Photo' button on contacts didn't accurately cover the image upload area. The change refactors the code to improve stability and reliability of the contact image field, ensuring users can easily add photos to their contacts.
Original PR description
This PR aims to fix an issue where the click zone for `.o_image_uploader_container` doesn't take the appropriate space when adding a new photo to a contact. task-5100043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a minor issue where the color selector in the HTML editor toolbar was behaving inconsistently. The fix ensures the test results are reliable, preventing potential disruptions for users. This improves the overall stability and predictability of the HTML editor feature.
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 fixes a crash that occurred when settling orders with subscription products via 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 order settlement.
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 minor issue in how Odoo identifies PDF files. Previously, the system was overly restrictive in recognizing PDF mimetypes, potentially causing problems with certain file types. This fix restores the ability to handle PDF mimetypes that include 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 vendor codes and names weren't consistently updating in purchase order descriptions. The underlying system logic was flawed, leading to incorrect descriptions after changing the vendor in a sales order. The fix ensures accurate vendor information is reflected in all purchase order descriptions.
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 resolves issues preventing users from correctly completing the mass mailing onboarding tour and fixes a text overflow problem in the mass mailing builder. The changes ensure the tour steps function as intended and improve the editor's ability to handle long text strings, enhancing usability.
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 a specific VAT tax rate for Swedish sales outside the EU. The tax name has been corrected from '0% EU RS' to '0% EX RS' to accurately reflect the transaction type. This ensures proper tax reporting and compliance with Swedish regulations.
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 without a project or assigned users. The fix ensures that the task creator automatically gains access rights upon creation, preventing the error. 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 resolves an issue where a previous fix inadvertently duplicated a variable name within a module, leading to unexpected behavior. The change ensures correct functionality for holiday calculations and prevents potential errors. This is a routine fix to maintain stability.
Original PR description
A previous bugfix unintentionally used the same variable name twice within the same method which caused some unintended behavior Task-6092087 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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 shown to users. This improves the reliability and usability 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 a small typographical error within the Odoo testing framework. The fix ensures the accuracy of test results and maintains the stability of the base module. This change has no impact on Odoo's functionality.
Original PR description
A typo was introduced in #163714 Forward-Port-Of: odoo/odoo#256756 Forward-Port-Of: odoo/odoo#228977
This update resolves an issue causing slow website performance when displaying product categories. The fix eliminates a redundant process for checking published products, resulting in more efficient database queries and faster page loading times. This improves the overall user experience.
Original PR description
`has_published_products` was previously computed recursively. For recursive fields, the ORM disables prefetch optimizations. In 3ffca1961cb1671e7028dd4dceca82d2e74a2e21, the computation switched to…
`has_published_products` was previously computed recursively. For recursive fields, the ORM disables prefetch optimizations.
In 3ffca1961cb1671e7028dd4dceca82d2e74a2e21, the computation switched to `_read_group` to avoid loading all published products into cache and prevent memory issues. However, this introduced an N+1 pattern when evaluating:
```python
categories.filtered(lambda categ: categ.has_published_products)
```
As a result, query count became dependent on the number of active categories, which broke SQL performance tests when demo data were installed.
This commit updates the computation again to avoid recursion and restore ORM prefetch optimizations, making the number of queries independent of the number of active categories.
This commit also removes redundant checks already enforced by ORM `ir.rule`. For example, the following pattern evaluates `has_published_products` three times: once in the user domain, once in the access rule domain added by `search`, and once in the filter.
```python
domain = [("has_published_products", "=", True)]
categs = self.env["product.public.category"].search(domain)
categs.filtered("has_published_products")
```
runbot-234948
Forward-Port-Of: odoo/odoo#256664
Forward-Port-Of: odoo/odoo#256415This update fixes an issue where virtual keyboards unexpectedly appeared on touch devices when opening dialogs. The change ensures focus is correctly placed within the dialog, preventing the keyboard from triggering while maintaining the expected functionality. This enhances the user experience for all users, especially those on mobile devices.
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#256880
This update corrects a bug that prevented the correct display of amounts in words for Czech users. A temporary fix was implemented to ensure accurate conversion, and this will be removed when Odoo uses a newer version of the `num2words` library with the necessary Czech language support. This ensures accurate financial reporting for Czech-speaking customers.
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#257105 Forward-Port-Of: odoo/odoo#257031
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, ensuring emails are displayed accurately regardless of the user's language setting. 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 resolves a problem where website assets wouldn't load correctly on replica Odoo instances after a theme change. The fix ensures that the replica receives the latest asset information directly from the primary, preventing errors and improving website functionality. This improves the user experience for Odoo users on replica environments.
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#255530
13 changes
Resolved issues and error corrections
This update resolves an issue where line breaks added to quotation template section titles were being removed. The fix ensures section titles remain as single lines, aligning with the intended design and preventing confusion for users. The change corrects a technical detail in how the system renders section names.
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 fixes a flaw in the website user leaderboard that incorrectly ranked users based on their all-time karma. The change ensures users are now accurately displayed based on their recent activity (week or month), improving the user experience and data accuracy. This was achieved by pre-calculating karma gains 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#256908 Forward-Port-Of: odoo/odoo#176626
This update fixes a problem where the translation editor on appointment details pages (when guests are allowed) would break due to newline characters in the data. The fix uses a more robust regex to handle these characters, ensuring translations are correctly displayed. This improves the user experience for appointment scheduling with guest options.
Original PR description
When we are at the appointment details page, and have the option allow_guests turned on, and go to the editor for translation, we encounter the issue. Steps To Reproduce: 1. Create an appointment. 2.…
When we are at the appointment details page, and have the option allow_guests turned on, and go to the editor for translation, we encounter the issue. Steps To Reproduce: 1. Create an appointment. 2. Go to the "Options" tab, and click on "Allow Guests". 3. Go to the web page for the appointment, select the data and time. 4. Now, on the details page, go to any other language than the default, and click on edit/translate. 5. The issue occurs. The issue occurs when the regex tries to match the placeholder where the guests are added, which is enabled by the allow_guests. It contains strings with newline characters. The regex fails to take into consideration for these newlines and breaks causing the issue to appear. To fix the issue, we'll use regex to account for the new lines. Also the fix adapts [this commit](https://github.com/odoo/odoo/commit/bc30d2592d4a7913eddf30bac8be2d94b6c22ad4) to work with the [website refactoring](https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2) opw-5412775
This update resolves an issue where the color selector in the HTML editor toolbar was behaving inconsistently. The fix, stemming from a technical update, ensures the test results are reliable and predictable, preventing potential disruptions for users. This improves the overall stability of the HTML editor functionality.
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 a small typographical error within the Odoo testing framework. The fix ensures the tests run smoothly and accurately, maintaining the stability of the base module. This change does not impact any business functionality.
Original PR description
A typo was introduced in #163714 Forward-Port-Of: odoo/odoo#256756 Forward-Port-Of: odoo/odoo#228977
This update fixes an issue where boolean settings linked to configuration parameters were incorrectly interpreted as 'False' in the system. The change ensures that string values like 'False' are correctly parsed as boolean values ('False') when setting configuration options, preventing unexpected behavior and ensuring accurate settings are displayed. This improves the reliability of configuration settings.
Original PR description
When a boolean field on `res.config.setting` tied to `ir.config_parameter` via `config_param` attribute, the value is incorrectly parse as param store `False` as `"False"` and later being shown as `True` on the setting form. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257033
This update resolves a crash that occurred when users deleted fields within the website form builder. The issue stemmed from the way website forms were inadvertently treated as XML, leading to parsing errors. The fix ensures that field deletions are handled correctly, preventing disruptions to website functionality.
Original PR description
Steps to reproduce ================== tl;dr: html fields are parsed as xml - Go to Helpdesk > Tickets > Warranty - Open studio - Add a new text field named "TEST" - Remove it from the view - Exit studio - Go to the website - Click on new - Add a new blogpost - Set a title and save - Click on "Contact & Forms" - Click on the first block - Click on the form - Change the form action to "Create a ticket" - Click on "+ Field" - Change the Type selection to "TEST" - Click on save - Enable debug mode - Go to "Settings / Technical / Database Structure / Fields" - Type x_ in the search bar and press enter - Delete the field => lxml.etree.XMLSyntaxError Cause of the issue ================== When deleting a field, `_check_if_used_in_website_form` is called to prevent the deletion if a field is used in an html field. The html fields were parsed with an xml parser.. opw-5946029 Forward-Port-Of: odoo/odoo#256066
This update corrects a bug that prevented the correct display of amounts in words for Czech users. A temporary fix was implemented to ensure accurate conversion using the `num2words` library. This will be automatically resolved when Odoo uses a newer version of the library with Ubuntu 25.10 or later.
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#257105 Forward-Port-Of: odoo/odoo#257031
This update resolves a problem where website assets weren't loading 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 via read-only 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#255530
This update fixes an issue where the cursor wasn't updating correctly in Safari on iOS when the editor was collapsed. By adjusting where the cursor is positioned, the HTML editor now displays the cursor properly across all devices, particularly in Safari, ensuring a consistent and functional user experience.
Original PR description
Before this commit: when we applying format on collapsed cursor, we create a formatted element with ZWS, and set the cursor before the ZWS After this commit: we set the cursor after the ZWS, cause otherwise safari doesn't update the cursor properly leading to unformatted input task-4243977 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256757 Forward-Port-Of: odoo/odoo#249253
This update fixes an issue where email notifications were incorrectly routing external emails as internal aliases. The change enhances the system's ability to accurately filter internal aliases based on allowed domains, preventing potential notification errors and ensuring correct email delivery. This improves the reliability of our notification system.
Original PR description
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains…
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains internal emails (aliases to filter) AND external email addresses (should not be filtered). The `_find_aliases` method is used to identify internal system emails (aliases, bounces, catchalls) to prevent mail loops and ensure correct recipient filtering during notification grouping. Before this fix, when the `mail.catchall.domain.allowed` system parameter was set, the logic for local-part aliases (where `alias_incoming_local` is True) failed to correctly associate the local part with the allowed domains. This resulted in external email addressed being returned by the system, potentially leading to incorrect notification routing. We now use a more robust approach: - Pre-filter local parts based on the allowed domains to reduce DB load. - Utilize Python Sets for O(1) lookups of static and local aliases - Explicitly validate the (local_part, domain) combo during the final filtering. Example Scenario: - Config: mail.catchall.domain.allowed = "test1.com,test2.com" - Alias: "info" (alias_incoming_local=True) - Input: ["info@test1.com", "info@test3.com"] ### Output Before Fix: ["info@test1.com", "info@test3.com"] (The function failed to recognize info@test3.com as an external alias to be ignored based on the `mail.catchall.domain.allowed` config) ### Output After Fix: ["info@test1.com"] (Correctly identifies the internal alias tob filtered while ignoring the external one) OPW-5469264 OPW-5504201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244272
This update resolves an issue where the default email template body wasn't displaying in the full composer view. The fix ensures that the correct template body is populated, regardless of whether the user manually enters content in the composer, improving email communication reliability.
Original PR description
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or…
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or contains only the user's signature. **Steps to reproduce:** 1. Install `contact` 2. Open any contact form. 3. In the chatter, click 'Send message' and then expand button 4. Write a something in body, then save this as a new template. 5. Set this new template as the default (using Debug Mode > Set Default Values). 6. Click 'Send message' in the chatter, 7. Click the 'Full composer' (expand) button without typing anything. **Observed behavior:** - The full composer opens with the correct subject from the default template, but the body is empty. **Cause:** - The `onClickFullComposer` method always passes a `default_body` value in the context to the mail.compose.message wizard. Even if the chatter input is empty **Solution:** - Forward isBodyEmpty in the context from onClickFullComposer. If the user typed content, do nothing. If the body is empty and a default template is available, allow the backend to apply the default template by removing default_body. opw-5405056 Forward-Port-Of: odoo/odoo#254735 Forward-Port-Of: odoo/odoo#239851
This update resolves a bug where the bold formatting action wasn't consistently removing bolding from text selections, particularly when `/file` components were present. The fix ensures that bolding is correctly applied or removed based solely on editable text, improving the note editor's functionality and user experience.
Original PR description
When determining whether the "bold" action is about adding bold or removing bold, non-editable text nodes are also taken into account. Because of this, if the selection contains an embedded component such as `/file`, it always considers bold was not applied on all nodes, and should therefore be applied. The action thus never removes bold. This commit fixes this by only taking into account the editable nodes. Steps to reproduce: - Go to a "To do" note - Add a few lines of text - Add a `/file` in the middle - Select all - Press Ctrl+B: bold is applied on the surrounding text - Press Ctrl+B again => Bold was not removed from the surrounding text task-5955977 Forward-Port-Of: odoo/odoo#249816
10 changes
Resolved issues and error corrections
This update ensures that the total value displayed for stock items remains consistent between versions 18 and 19. The change corrects a calculation error where only internal locations were considered, leading to discrepancies when migrating to the newer version. This update ensures accurate stock valuation reporting.
Original PR description
**Steps to reproduce** - Create a database in v18.0. - Install the stock and sale modules. - Create a storable product. - Add 100 units as on-hand quantity using an inventory adjustment in the…
**Steps to reproduce** - Create a database in v18.0. - Install the stock and sale modules. - Create a storable product. - Add 100 units as on-hand quantity using an inventory adjustment in the internal location (e.g., WH/Stock). - Create a transit location. - Create an internal transfer and move 20 units from the internal location (WH/Stock) to the Transit location. - WH/Stock now contains 80 quantities. - Transit location contains 20 quantities. - See stock valuation of product. **Issue** - In v18, `value_svl` and `quantity_svl` are computed from [Stock Valuation Layers](https://github.com/odoo/odoo/blob/18.0/addons/stock_account/models/product.py#L213) After that, `total_value` is calculated using the formula [`avg_cost * qty_available`](https://github.com/odoo/odoo/blob/18.0/addons/stock_account/models/product.py#L205). However, when calling `qty_available`, no location context is passed to specify which locations should be considered. Because of this, `qty_available` only considers quantities from internal locations. As a result, the final `total_value` is computed based only on the internal location quantity (80). - When the customer migrates the database to v19, the displayed `total_value` changes. In v19, both (100 qty) internal and transit locations are considered when computing the quantity used for valuation. This happens because a valuation [context](https://github.com/odoo/odoo/blob/19.0/addons/stock_account/models/product.py#L203) is passed when selecting the locations for the quantity computation. Due to this change, the quantity used in the calculation includes both internal and transit locations, which can lead to a different `total_value` being displayed compared to v18. **Solution** - To resolve this issue, the valuation context has been passed when computing the value in the function. This context includes both internal and transit locations. As a result, when `qty_available` is computed, it considers these locations, and the resulting `total_value` remains consistent with the valuation logic. opw-5924110 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254120
This update fixes an issue where the customer stock report incorrectly showed lots as unreturned when multiple partial returns were made. The change ensures that returned lots are accurately identified and displayed, preventing duplicate records and improving the reliability of the report. This ensures accurate stock reporting for customers.
Original PR description
### Issues: The customer stock.lot.report is not well behaved with respect to multiple partial returns which can lead to returned lots that are not correctly flagged as returned and to duplicate…
### Issues: The customer stock.lot.report is not well behaved with respect to multiple partial returns which can lead to returned lots that are not correctly flagged as returned and to duplicate records. ### Steps to reproduce: - Create a product tracked by SN and put 3 units in stock SN1, SN2, SN3 - Create, confirm and validate a delivery for these two units for Bob. - Click Return, return 1 unit and validate the return for the SN1 - Click Return, return 1 unit and validate the return for the SN2 - Open the contact form of Bob > Lots serial numbers smart button #### > There are two lines referring to SN2 both are flagged as un-returned ### Cause of the issue: In order to determine if a lot has been returned the `stock.lot.report` joins the stock_move_line table with it self based on picking and returns of these: https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L48-L71 Records are then grouped to represent single move lines and a move line is expected to be returned to be returned if it is related to at least one move line on a return of its picking sharing the same lot related data (see the definition of `has_return`): https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L22-L34 Now the issue is that the group by close actually group records based on the `sml_return.id`: https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L73-L89 which does not make sense since we expect to aggregate `sml_return.id`'s to compute the `has_return` field and since we do not want a move line of the original delivery to appear twice simply because it is linked to two returns one with and one without returned move line. opw-5974155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256396
This update fixes a flaw in the website's leaderboard that incorrectly ranked users based on their recent activity. The system now accurately calculates and displays user rankings by weekly and monthly karma gains, ensuring a fairer and more relevant leaderboard experience. This improvement ensures users are recognized for their current performance.
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#256908 Forward-Port-Of: odoo/odoo#176626
This update resolves a minor issue with the HTML editor's color selector, ensuring consistent test results. Because the toolbar is a popover, it's susceptible to unpredictable behavior. This fix improves the reliability of the 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 fixes an issue where boolean settings linked to configuration parameters were incorrectly interpreted as 'False' in the system. The change ensures that string values like "False" are correctly parsed as boolean values ('False') when setting configuration options, preventing unexpected behavior and ensuring accurate settings are displayed. This improves the reliability of configuration settings.
Original PR description
When a boolean field on `res.config.setting` tied to `ir.config_parameter` via `config_param` attribute, the value is incorrectly parse as param store `False` as `"False"` and later being shown as `True` on the setting form. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257033
This update resolves an issue where deleting certain fields within the website form functionality caused a crash. The problem stemmed from how website fields were incorrectly parsed as XML. The fix ensures that field deletions are handled correctly, preventing unexpected errors and improving website stability.
Original PR description
Steps to reproduce ================== tl;dr: html fields are parsed as xml - Go to Helpdesk > Tickets > Warranty - Open studio - Add a new text field named "TEST" - Remove it from the view - Exit studio - Go to the website - Click on new - Add a new blogpost - Set a title and save - Click on "Contact & Forms" - Click on the first block - Click on the form - Change the form action to "Create a ticket" - Click on "+ Field" - Change the Type selection to "TEST" - Click on save - Enable debug mode - Go to "Settings / Technical / Database Structure / Fields" - Type x_ in the search bar and press enter - Delete the field => lxml.etree.XMLSyntaxError Cause of the issue ================== When deleting a field, `_check_if_used_in_website_form` is called to prevent the deletion if a field is used in an html field. The html fields were parsed with an xml parser.. opw-5946029 Forward-Port-Of: odoo/odoo#256066
This update fixes an issue where the HTML editor toolbar wasn't appearing on macOS when using Cmd+Shift+Arrow to select text. The fix utilizes a secondary event listener to ensure the toolbar activates correctly, even when the Cmd key is held down. This improves the user experience for macOS users.
Original PR description
Problem: The toolbar does not open when using Cmd+Shift+Arrow to select text on macOS. Cause: On macOS, when the Cmd key is held down, the `keyup` event is never fired for other keys. The toolbar…
Problem:
The toolbar does not open when using Cmd+Shift+Arrow to select text on macOS.
Cause:
On macOS, when the Cmd key is held down, the `keyup` event is never fired for other keys. The toolbar relies on `keyup` for Arrow keys to re-enable `onSelectionChangeActive` and trigger the toolbar update, so it never opens.
See section ("Issue 3 - keyup event put on hold for other keys"): https://web.archive.org/web/20160304022453/http://bitspushedaround.com/on-a-few-things-you-may-not-know-about-the-hellish-command-key-and-javascript-events/
Solution:
Track when an Arrow key is pressed while Cmd is held (`pendingArrowKey`) and use a `selectionchange` listener as a fallback to re-enable the toolbar. The `selectionchange` event fires reliably on macOS even when `keyup` is suppressed. A `isMouseDown` guard ensures the listener does not interfere with the existing mousedown/mouseup flow.
Steps to reproduce:
1- Type some text
2- Use Cmd+Shift+Arrow (left or right) to select text 3- Observe the toolbar does not appear
task-6013408
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253293This update resolves an issue preventing the correct display of amounts in words for Czech users within Odoo. A temporary patch was implemented to utilize the correct language code. Once the system uses Ubuntu 25.10 or later (with Python 3.13 or higher), this patch will be automatically removed as the `num2words` library has been updated with the necessary fix.
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#257105 Forward-Port-Of: odoo/odoo#257031
This update fixes an issue where email notifications were incorrectly routing external emails as internal aliases. The change enhances the system's ability to accurately filter internal system emails based on allowed domains, preventing potential notification errors and ensuring correct recipient targeting. This improves the reliability of our email communication.
Original PR description
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains…
The fix introduced in https://github.com/odoo/odoo/pull/216737 can lead to "over-eager" filtering when an external email address matches a localpart (left part) alias in a input email list contains internal emails (aliases to filter) AND external email addresses (should not be filtered). The `_find_aliases` method is used to identify internal system emails (aliases, bounces, catchalls) to prevent mail loops and ensure correct recipient filtering during notification grouping. Before this fix, when the `mail.catchall.domain.allowed` system parameter was set, the logic for local-part aliases (where `alias_incoming_local` is True) failed to correctly associate the local part with the allowed domains. This resulted in external email addressed being returned by the system, potentially leading to incorrect notification routing. We now use a more robust approach: - Pre-filter local parts based on the allowed domains to reduce DB load. - Utilize Python Sets for O(1) lookups of static and local aliases - Explicitly validate the (local_part, domain) combo during the final filtering. Example Scenario: - Config: mail.catchall.domain.allowed = "test1.com,test2.com" - Alias: "info" (alias_incoming_local=True) - Input: ["info@test1.com", "info@test3.com"] ### Output Before Fix: ["info@test1.com", "info@test3.com"] (The function failed to recognize info@test3.com as an external alias to be ignored based on the `mail.catchall.domain.allowed` config) ### Output After Fix: ["info@test1.com"] (Correctly identifies the internal alias tob filtered while ignoring the external one) OPW-5469264 OPW-5504201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244272
This update resolves an issue where the default email template body wasn't appearing in the full composer view within the chatter. The fix ensures that the correct default template body is loaded, regardless of whether the user manually enters content in the composer, improving email communication reliability.
Original PR description
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or…
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or contains only the user's signature. **Steps to reproduce:** 1. Install `contact` 2. Open any contact form. 3. In the chatter, click 'Send message' and then expand button 4. Write a something in body, then save this as a new template. 5. Set this new template as the default (using Debug Mode > Set Default Values). 6. Click 'Send message' in the chatter, 7. Click the 'Full composer' (expand) button without typing anything. **Observed behavior:** - The full composer opens with the correct subject from the default template, but the body is empty. **Cause:** - The `onClickFullComposer` method always passes a `default_body` value in the context to the mail.compose.message wizard. Even if the chatter input is empty **Solution:** - Forward isBodyEmpty in the context from onClickFullComposer. If the user typed content, do nothing. If the body is empty and a default template is available, allow the backend to apply the default template by removing default_body. opw-5405056 Forward-Port-Of: odoo/odoo#254735 Forward-Port-Of: odoo/odoo#239851
11 changes
Resolved issues and error corrections
This update resolves an issue where the default email template body wasn't loading correctly in the full composer view within the chatter. Previously, only the subject line was shown, leaving the body blank. The fix ensures the default template body is populated when the full composer is opened without user input, improving email communication functionality.
Original PR description
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or…
**Issue:** - When opening the full composer from the chatter, the body of the default email template is not loaded. Only the subject line from the template appears, while the body remains empty or contains only the user's signature. **Steps to reproduce:** 1. Install `contact` 2. Open any contact form. 3. In the chatter, click 'Send message' and then expand button 4. Write a something in body, then save this as a new template. 5. Set this new template as the default (using Debug Mode > Set Default Values). 6. Click 'Send message' in the chatter, 7. Click the 'Full composer' (expand) button without typing anything. **Observed behavior:** - The full composer opens with the correct subject from the default template, but the body is empty. **Cause:** - The `onClickFullComposer` method always passes a `default_body` value in the context to the mail.compose.message wizard. Even if the chatter input is empty **Solution:** - Forward isBodyEmpty in the context from onClickFullComposer. If the user typed content, do nothing. If the body is empty and a default template is available, allow the backend to apply the default template by removing default_body. opw-5405056 Forward-Port-Of: odoo/odoo#239851
This update fixes an issue where the HTML editor toolbar wasn't opening correctly on macOS when using Cmd+Shift+Arrow to select text. The fix utilizes a secondary event listener to ensure the toolbar activates reliably, regardless of the Cmd key's behavior. This improves the user experience for macOS users.
Original PR description
Problem: The toolbar does not open when using Cmd+Shift+Arrow to select text on macOS. Cause: On macOS, when the Cmd key is held down, the `keyup` event is never fired for other keys. The toolbar…
Problem:
The toolbar does not open when using Cmd+Shift+Arrow to select text on macOS.
Cause:
On macOS, when the Cmd key is held down, the `keyup` event is never fired for other keys. The toolbar relies on `keyup` for Arrow keys to re-enable `onSelectionChangeActive` and trigger the toolbar update, so it never opens.
See section ("Issue 3 - keyup event put on hold for other keys"): https://web.archive.org/web/20160304022453/http://bitspushedaround.com/on-a-few-things-you-may-not-know-about-the-hellish-command-key-and-javascript-events/
Solution:
Track when an Arrow key is pressed while Cmd is held (`pendingArrowKey`) and use a `selectionchange` listener as a fallback to re-enable the toolbar. The `selectionchange` event fires reliably on macOS even when `keyup` is suppressed. A `isMouseDown` guard ensures the listener does not interfere with the existing mousedown/mouseup flow.
Steps to reproduce:
1- Type some text
2- Use Cmd+Shift+Arrow (left or right) to select text 3- Observe the toolbar does not appear
task-6013408
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253293This update resolves a bug in the demo mode for branch companies using the Peppol integration. Previously, attempting to disconnect resulted in an error due to a missing button and subsequent safeguard blocking. Now, the demo mode functions correctly without requiring external calls, ensuring a smoother user experience.
Original PR description
V18.0 -> V18.4 When a branch company registers in demo mode, then tries to disconnect, the button that handles the disconnection was not added to the demo behavior so a real call was attempted, which was blocked by another safe guard resulting in an error, idealy in demo mode everything should work without having to make any external calls task-none Forward-Port-Of: odoo/odoo#257085
This update resolves an issue where the color selector in the HTML editor toolbar was behaving inconsistently. The toolbar is a popover, making it susceptible to these types of unpredictable behavior. This change ensures the color selector test is reliable and provides a more stable user experience.
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 fixes an issue where shipping costs were incorrectly calculated for orders containing combo products. The fix ensures that shipping costs are accurately determined based on the quantity of individual components within the combo, preventing inflated shipping charges. This improves the accuracy of shipping calculations for all customers.
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#256055This update fixes an issue where the stock report wasn't accurately reflecting multiple partial returns. Previously, returns could lead to incorrect reporting and duplicate records. This change ensures that returned lots are correctly identified in the report, providing accurate stock visibility for customers.
Original PR description
### Issues: The customer stock.lot.report is not well behaved with respect to multiple partial returns which can lead to returned lots that are not correctly flagged as returned and to duplicate…
### Issues: The customer stock.lot.report is not well behaved with respect to multiple partial returns which can lead to returned lots that are not correctly flagged as returned and to duplicate records. ### Steps to reproduce: - Create a product tracked by SN and put 3 units in stock SN1, SN2, SN3 - Create, confirm and validate a delivery for these two units for Bob. - Click Return, return 1 unit and validate the return for the SN1 - Click Return, return 1 unit and validate the return for the SN2 - Open the contact form of Bob > Lots serial numbers smart button #### > There are two lines referring to SN2 both are flagged as un-returned ### Cause of the issue: In order to determine if a lot has been returned the `stock.lot.report` joins the stock_move_line table with it self based on picking and returns of these: https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L48-L71 Records are then grouped to represent single move lines and a move line is expected to be returned to be returned if it is related to at least one move line on a return of its picking sharing the same lot related data (see the definition of `has_return`): https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L22-L34 Now the issue is that the group by close actually group records based on the `sml_return.id`: https://github.com/odoo/odoo/blob/109f829c2b461b14167e9227e42d096d4410a3b3/addons/stock/report/stock_lot_customer.py#L73-L89 which does not make sense since we expect to aggregate `sml_return.id`'s to compute the `has_return` field and since we do not want a move line of the original delivery to appear twice simply because it is linked to two returns one with and one without returned move line. opw-5974155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256396
This update fixes an issue where boolean settings linked to configuration parameters were incorrectly interpreted as 'False' in the system. The change ensures that string values like "False" are correctly parsed as boolean values ('False') when setting configuration options, preventing unexpected behavior and ensuring accurate settings are displayed. This improves the reliability of configuration settings.
Original PR description
When a boolean field on `res.config.setting` tied to `ir.config_parameter` via `config_param` attribute, the value is incorrectly parse as param store `False` as `"False"` and later being shown as `True` on the setting form. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257033
This update fixes a bug that caused website crashes when users deleted fields within the Helpdesk system. The issue stemmed from how website forms were parsing fields as XML, leading to errors during deletion. The fix ensures that fields are handled correctly during deletion, improving website stability and user experience.
Original PR description
Steps to reproduce ================== tl;dr: html fields are parsed as xml - Go to Helpdesk > Tickets > Warranty - Open studio - Add a new text field named "TEST" - Remove it from the view - Exit studio - Go to the website - Click on new - Add a new blogpost - Set a title and save - Click on "Contact & Forms" - Click on the first block - Click on the form - Change the form action to "Create a ticket" - Click on "+ Field" - Change the Type selection to "TEST" - Click on save - Enable debug mode - Go to "Settings / Technical / Database Structure / Fields" - Type x_ in the search bar and press enter - Delete the field => lxml.etree.XMLSyntaxError Cause of the issue ================== When deleting a field, `_check_if_used_in_website_form` is called to prevent the deletion if a field is used in an html field. The html fields were parsed with an xml parser.. opw-5946029 Forward-Port-Of: odoo/odoo#256066
This update resolves an issue where users would receive an access error when creating private tasks. The fix ensures that a user is automatically added as a task follower upon creation, granting them necessary access rights. This prevents the error that occurred when a task was initially created without a project or assigned users.
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#242216
This update corrects a bug that prevented the correct display of amounts in words for Czech users within Odoo. A temporary workaround was implemented to ensure the feature works correctly. This will be automatically resolved when Odoo is upgraded to use the latest version of the `num2words` library.
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#257105 Forward-Port-Of: odoo/odoo#257031
This update resolves a problem where website assets wouldn't load correctly on replica Odoo instances after a theme change. The fix ensures that the replica receives the latest asset information directly from the primary instance, preventing errors and improving website functionality. This improves the user experience for users accessing Odoo through replicas.
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#255530
12 changes
Resolved issues and error corrections
This update fixes an issue where refund creation from invoices with similar line items would fail due to incorrect matching. The new algorithm now accurately identifies the best matching invoice line based on product, price, and quantity, ensuring refunds are processed correctly. 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#256953 Forward-Port-Of: odoo/odoo#252200
This update corrects a visual issue where the table row menu was misaligned on RTL (Right-to-Left) websites. The fix ensures the menu's position is correctly calculated based on the website's language direction, improving the user experience for Arabic and other RTL language users. This resolves a bug impacting table display consistency.
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 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
This update resolves a mobile issue where pinching to zoom on product images caused the entire page to zoom instead of just the image. The fix ensures that pinch-to-zoom functionality correctly scales only the product image viewer, improving the mobile shopping experience.
Original PR description
Steps to reproduce: - Open Runbot on a mobile device - Go to Shop > Open any product page - Ensure zoom on click is enabled - Tap the product image to open the popup - Zoom in with a single tap (works as expected) - Use two fingers to pinch and zoom - Notice the whole page zooms instead of just the image Issue: - Pinch-to-zoom gesture zooms the entire page instead of only the product image popup on mobile devices. Cause: - Touch events are not handled, allowing the browser’s default zoom behavior instead of applying zoom only to the image viewer. Fix: - Implement proper touch gesture handling to detect pinch zoom, prevent default browser behavior, and apply scaling only to the image inside the viewer. opw-5950490
This update corrects a previous issue where line breaks added to quotation template section titles were being removed. The change ensures section titles remain editable as intended, preventing users from needing to create new sections for formatted titles. This improves the usability of 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 resolves a bug that prevented users from creating tasks from templates after refreshing a page. The fix ensures that the system correctly handles virtual controllers during page reloads, preventing errors and improving the task creation process. This ensures a smoother user experience when working with templates.
Original PR description
Steps to reproduce: - Open a project - Create a task and convert it into a template - Open another task (task A) - Reload the page - Create a task from the newly created template Refreshing the page causes `loadState` to rebuild the controller stack from the URL to represent the breadcrumb history. In this case, a virtual form controller is injected for the opened task A, due to the lack of context in the URL to reconstruct it fully. When creating the task from the template, a `switchView` to the new task's form view is triggered. However, only the controller for this new form view is fully populated with the relevant metadata, as the preceding ones are virtual (due to the above). This commit ensures that virtual controllers are excluded from the check on the `multiRecord` field, preventing an error since the `view` is undefined for virtual controllers. task-5876607
This update resolves an issue where background images in mass mailings 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 in 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
This update resolves an issue preventing internal users from accessing overtime data. The fix adds a necessary security rule to allow read access to overtime lines for standard users, ensuring they can view their own overtime information as intended. This prevents access errors and maintains data visibility.
Original PR description
Steps to reproduce: 1. Enable "Display Extra Hours" in Attendance settings. 2. Assign an overtime ruleset to an employee. 3. Ensure the employee does not have the "Officer: Manage attendances" group.…
Steps to reproduce: 1. Enable "Display Extra Hours" in Attendance settings. 2. Assign an overtime ruleset to an employee. 3. Ensure the employee does not have the "Officer: Manage attendances" group. 4. Create an attendance that generates extra hours for this employee. 5. Log in as the employee and open the Employees app to view Extra Hours. Issue: An Access Error is raised because `get_overtime_data_by_employee` in `hr_holidays_attendance/models/hr_employee.py` performs a `_read_group` on `hr.attendance.overtime.line`. In 19.0, the only ACL for this model grants access to `group_hr_attendance_officer`: https://github.com/odoo/odoo/blob/95c73aa4dd7433f394799fdaaad57a84d750ec5a/addons/hr_attendance/security/ir.model.access.csv#L1-L11 Users with `group_hr_attendance_own_reader` (implied by `base.group_user`, i.e. all internal users) have no read access to `hr.attendance.overtime.line`. In later versions, this was already fixed by adding a read-only ACL for `group_hr_attendance_own_reader` on this model: https://github.com/odoo/odoo/blob/ad4a2ec11fea2058445e4003099af3a5caa1ef22/addons/hr_attendance/security/ir.model.access.csv#L13 This is why forward-ports are not needed. Solution: Add the missing `access_hr_attendance_overtime_line_own_reader` ACL to grant read-only access to `group_hr_attendance_own_reader` on `hr.attendance.overtime.line`, matching the approach used in later versions. This is preferred over using `.sudo()` as it properly grants the intended access right rather than bypassing security checks entirely. opw-6055081
This update resolves an issue where the color selector in the HTML editor toolbar was behaving unpredictably. The toolbar is a popover, making it susceptible to these types of inconsistencies. This change ensures the color selector test is reliable and consistent.
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 a bug where the total value calculation wasn't correctly displayed in the 'Inventory at Date' report. The fix ensures that users can accurately see the total value of inventory on a specific date, improving the reliability of stock reporting. This change impacts the Stock Accounting module.
Original PR description
### Steps to reproduce: - Inventory > Reporting > Stock - Click Inventory at Date and select any date > Confirm #### > The sum of the Total Value is no longer displayed in the views opw-5918288 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug where attendance reports were incorrectly displaying expected hours. The system now accurately calculates expected hours based on the employee's standard working schedule, ensuring accurate tracking of time worked and expected time.
Original PR description
Steps to reproduce:
-----------------------------------------
1. Install the Attendance module
2. Create an employee with a Standard 40h/week working schedule
3. Create its attendance:
* Check in at 10:00 AM.
* Check out at 06:00 PM (total 7 hours)
4. Navigate to Attendance > Reporting > Attendances
Observation:
-----------------------------------------
The Expected Hours column shows 7 hours, matching the worked hours, instead of the expected 8 hours based on the working schedule
Issue:
-----------------------------------------
In `_compute_expected_hours`, when no overtime is recorded (worked hours < scheduled hours), the expected hours are incorrectly set equal to the worked hours
Solution:
-----------------------------------------
Ensure that when no overtime is recorded, the expected hours are computed based on the employee's working schedule instead of the worked hours
opw-5253946This update resolves a small typographical error within the Odoo testing framework. The fix ensures the tests run correctly and maintains the stability of the base module. It's a routine maintenance task to improve the quality of our codebase.
Original PR description
A typo was introduced in #163714 Forward-Port-Of: odoo/odoo#256756 Forward-Port-Of: odoo/odoo#228977
This 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 for subscription orders.
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
5 changes
Resolved issues and error corrections
This update ensures that archived channels and threads disappear instantly from the Discuss view, eliminating the need for page refreshes. Additionally, archiving a channel now automatically hides its subchannels. This improves the user experience and simplifies channel management.
Original PR description
Current behavior before PR: - Archived channels and threads remain visible in Discuss until the page is refreshed. - Archiving a channel does not affect its subchannels. Desired behavior after PR is merged: - Archived channels and threads are instantly removed from the Discuss view without requiring a page refresh. - Archiving a channel also archives and hides its subchannels. task-id: [4764934](https://www.odoo.com/odoo/project/1519/tasks/4764934) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that archived channels and their threads are instantly removed from the Discuss view, eliminating the need for page refreshes. Previously, archived content remained visible. Now, archiving a channel also automatically hides its subchannels, providing a cleaner and more organized experience.
Original PR description
Current behavior before PR: - Archived channels and threads remain visible in Discuss until the page is refreshed. - Archiving a channel does not affect its subchannels. Desired behavior after PR is merged: - Archived channels and threads are instantly removed from the Discuss view without requiring a page refresh. - Archiving a channel also archives and hides its subchannels. task-id: 4764934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a display issue where archived email templates were showing up in the applicant refusal workflow. The fix ensures that archived templates are no longer automatically included when searching for email templates during the refusal process, improving the user experience. This was caused by a technical issue related to how the system handles context keys.
Original PR description
Pre-requisites: --------------- 1. Create or duplicate any `hr.applicant` email template. 2. Archive the newly created template. 3. Archive the email template linked to a refuse reason. Steps to…
Pre-requisites:
---------------
1. Create or duplicate any `hr.applicant` email template.
2. Archive the newly created template.
3. Archive the email template linked to a refuse reason.
Steps to reproduce:
-------------------------
1. Install hr_recruitment.
4. Go to Recruitment > Applications > All Applications and open an applicant.
5. Click on the "Refuse" button to open the refuse wizard.
6. Click on the "Email Template" and click on 'Search More'
7. Observe available templates
Issue:
-------
1. Archived email templates are displayed in the Email Template field.
2. If a refuse reason is linked to an archived email template,
the wizard automatically pre-fills that archived template
Cause:
----------
1. After the [refactoring of Many2oneField](https://github.com/odoo-dev/odoo/commit/3670f78be767396f322ff3ebf068af5c2f547b36) to use dynamicInfo.context,
now ensures that global context keys propagate to relational fields.
The archive_applicant method opens the refuse wizard with **'active_test': False**
in the context to allow refusing archived applicants. As a result, this context is now
applied when fetching the email templates, causing archived records to be included in
the search results.
https://github.com/odoo/odoo/blob/7966fae0c1fd7cfb6023efc0c274b8b395bf862f/addons/web/static/src/views/fields/relational_utils.js#L313-L321
2. Moreover, the `_compute_send_mail` method automatically assigns
the template from the refuse reason without checking whether
the template is active, which allows archived templates to be
pre-filled in the wizard.
https://github.com/odoo/odoo/blob/a3bf9264ca25ec11b0c9742e142d2404cac6d261/addons/hr_recruitment/wizard/applicant_refuse_reason.py#L29-L33
Solution:
-----------
- Pass `context="{'active_test': True}"` to the `template_id` field to ensure
archived templates are excluded by default, while still allowing users
to manually search for them if needed.
- Update `_compute_send_mail` to ensure only active templates are
automatically assigned.
**NOTE:**
Issue 1 only exists till saas-18.4. From saas-18.4, email templates are fetched using [search_read](https://github.com/odoo/odoo/blob/90db6b197edb93814d980345af01c56c2b6e553e/addons/mail/static/src/core/web/mail_composer_template_selector.js#L33-L46) without passing
the context. Additionally, [search_read removes 'active_test'](https://github.com/odoo/odoo/blob/90db6b197edb93814d980345af01c56c2b6e553e/odoo/orm/models.py#L5780-L5785)
before formatting the result, so archived records are not included.
opw-5974244
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update optimizes the PDF generation process for Odoo's SA (Saudi Arabia) edition, addressing a significant performance bottleneck. Previously, PDF creation was delaying checkout by a substantial amount of time. Now, PDFs are only generated on demand, aligning with ZATCA requirements and improving the cashier experience.
Original PR description
For SA companies, wkhtmltopdf PDF generation was accounting for ~47% of the sync_from_ui response time (~3.1s out of ~6.5s total), blocking the cashier at every order. The PDF is not needed during checkout: ZATCA requires only the signed XML and returns the QR code. The PDF can be generated on demand when the invoice is first viewed or downloaded. opw-6019994 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update allows users to disable automatic PDF generation when importing XML invoices. Previously, Odoo always created a PDF, even if the invoice didn't include one. This change provides greater flexibility and control over invoice processing, aligning with user preferences.
Original PR description
Commit 7bc35c4 introduced automatic PDF generation for imported XML invoices that don't include an embedded PDF file. However, this behavior was mandatory and couldn't be disabled. This commit adds a new configuration parameter to allow users disable this behaviour. Task-6050566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
3 changes
Resolved issues and error corrections
This update reduces log clutter when QWeb templates fail to render, making it easier for support teams to diagnose issues. The change intelligently truncates template logs while retaining full source for unidentified errors, improving system performance and support efficiency.
Original PR description
This is mainly a backport of an IMP done at https://github.com/odoo/odoo/pull/252455 Given it's potential to reduce server bloat and increase of QOL for sys admins and support agents, backporting (a…
This is mainly a backport of an IMP done at https://github.com/odoo/odoo/pull/252455 Given it's potential to reduce server bloat and increase of QOL for sys admins and support agents, backporting (a sligthly modified version) seemed adequate. Summary: When a QWeb template fails to render, the current logic logs the entire template source and raises a generic UserError. This leads to significant log bloat and makes it difficult for developers and support staff to identify the specific failing template or the root cause of the error. This commit improves the error handling in `mail.render.mixin` and `mail.template` by: - mail.render.mixin: Added logic to identify the failing template's name and ID if it belongs to a `mail.template` or `mail.compose.message` (mass mailing). - Log Truncation: Implemented truncation for identified templates, showing only a snippet (first and last 500 chars) in logs and UserErrors to prevent log/UI bloat while keeping full source logging as a fallback for unidentified templates. OPW-5980295 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that line grouping functionality within the account_edi_ubl_cii module is limited to invoices only. Previously, this feature could be applied to other document types like journal entries, which could cause errors. This change improves data integrity and prevents potential issues related to incorrect grouping.
Original PR description
[FIX] account_edi_ubl_cii: Allow only invoices can be grouped Before this commit, no check was done on the document type at line grouping. This commit adds the check `is_invoice` so that we cannot group (e.g.) a journal entry type move no-task
This update fixes an issue where accrual calculations weren't working correctly for allocation modes other than 'By Employee'. The change ensures that allocation durations are automatically calculated accurately, regardless of the chosen allocation mode, improving the reliability of holiday accruals. This resolves a previous bug impacting how employees accrue time off.
Original PR description
### Steps to reproduce: - Create an accrual plan of one level to give 20 days at the start of the year - Create an allocation with different mode than 'By Employee' - Set the accrual plan for the…
### Steps to reproduce: - Create an accrual plan of one level to give 20 days at the start of the year - Create an allocation with different mode than 'By Employee' - Set the accrual plan for the allocation and date from 1st Jan - Notice the Allocation number of days doesn't get automatically calculated ### Cause: This is happening because when trying to process the accrual plan we won't have any records in the field employee_id https://github.com/odoo/odoo/blob/bcdd12d13d73915e565fd2c8478b936a16efb9f4/addons/hr_holidays/models/hr_leave_allocation.py#L892-L893 And since employee_id is computed field when computing it we don't handle the case of any other mode other than 'By Employee'. https://github.com/odoo/odoo/blob/bcdd12d13d73915e565fd2c8478b936a16efb9f4/addons/hr_holidays/models/hr_leave_allocation.py#L259-L270 ### Fix: If we have different mode in the allocation we fetch the employees in this mode (Department, Company, Employee Tag) and set them as the allocation employee_ids so when computing the employee_id we will have a record in the field and it won't be null P.S. In the forward port we will have to introduce another fix for the multi allocation wizard opw-5888023