Thursday, April 2, 2026
59 changes · saas-19.2
Resolved issues and error corrections
This update resolves a critical issue where the inventory valuation report crashed when processing large product catalogs (300k+). By optimizing how the report retrieves data, it now handles this scale efficiently without memory errors, significantly improving usability for businesses with extensive product inventories. The change reduces memory usage and processing time.
Original PR description
Behavior before: Opening the inventory valuation report on databases with 300k+ products (storable) caused an out-of-memory (OOM) error, making the report completely unusable at this scale. Behavior…
Behavior before: Opening the inventory valuation report on databases with 300k+ products (storable) caused an out-of-memory (OOM) error, making the report completely unusable at this scale. Behavior after: The inventory valuation report loads successfully and efficiently for 300k+ products without any memory errors or RAM spikes. Root Cause: In `_get_accounts_by_product()`, querying all storable products creates a massive recordset. When iterating through this recordset, the call to `_get_product_accounts()` accesses various relational and property fields (like categories and accounts). Because standard ORM prefetching was active, accessing these relational fields on the first loop iteration triggered a massive batch-fetch for all 300k+ products in the recordset simultaneously. This cascading prefetch overloaded the environment cache and caused an immediate OOM crash. Fix: Wrapped the `_get_accounts_by_product()` call in `with_context(prefetch_fields=False)`. This disables the greedy batch-loading behavior across the entire recordset. The ORM now fetches the required relational accounting fields surgically, record-by-record inside the loop, maintaining a minimal memory footprint and preventing the crash. Benchmark: | Products Count | Memory Before | Memory After | Time Before | Time After | |------------------------|-------------------------|----------------------|------------------- |----------------| | 300k+ | Memory Error | 1.1. GB | 46.63 s | 1.9 m | | 200k | Memory Error | 566.4 MB | 1.2 m | 1 m | | 100k | 873.1 MB | 286.8 MB | 36.74 s | 32.15 s | | 50k | 442.1 MB | 145.6 MB | 18.96 s | 17.65 s | opw-5462037 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253331
This update fixes an issue where refund processing for invoices with identical product details would repeatedly match lines, leading to errors. The new algorithm now accurately matches refunds based on product, price, and quantity, ensuring correct credit note generation. This improves the reliability of refund processing for users.
Original PR description
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail because it would match the first matching line over and over again. Also, lines should not match based on line label, as it can be modified in the refund. This commit solves these 2 issues by 1) Preventing matching an invoice line more than once with refund lines 2) Preventing matching based on line label The new algorithm finds the best match for a refund line from the invoice lines with the following criteria: 1) same product 2) same unit price 3) same discount 4) invoiced quantity should be at least equal to the refunded quantity 5) invoice line should not be matched before 6) from the lines that match previous criteria, we pick the one with the minium quantity task-6004207 Forward-Port-Of: odoo/odoo#257158 Forward-Port-Of: odoo/odoo#252200
This update resolves an issue where line breaks added to quotation template section titles were being removed. The fix ensures section titles display correctly as intended, preventing users from needing to create new sections for multi-line titles. This improves the user experience when creating and managing quotation templates.
Original PR description
Steps to produce: --- - Install `Sales` module. - Go to `Sales > Configuration > Sales Orders > Quotation Templates`. - Create a new template and add a section. - In the section name, add text with…
Steps to produce: --- - Install `Sales` module. - Go to `Sales > Configuration > Sales Orders > Quotation Templates`. - Create a new template and add a section. - In the section name, add text with line breaks using `Shift + Enter`. - Go to sale orders > Create new SO > Set quotation template created above. Issue: --- - Line breaks entered in the quotation template section lines are stripped when the template is applied to a sale order. These intentional sections are meant to be single-line titles; users should create a new section instead of using line breaks within one. Root cause: --- - At [1], the `name` field is defined without the `section_and_note_text` widget. This widget is responsible for rendering section lines as a `CharField` instead of a `TextField`, as seen at [2]. Solution: --- - Add `widget="section_and_note_text"` to the `name` field. This ensures section lines consistently use `CharField`, preventing line breaks from being entered. [1]https://github.com/odoo/odoo/blob/951b44c0ed5ffb90cff6fa2934ca2664d2faa59d/addons/sale_management/views/sale_order_template_views.xml#L96 [2]https://github.com/odoo/odoo/blob/951b44c0ed5ffb90cff6fa2934ca2664d2faa59d/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_fields_backend.js#L79-L86 opw-6034255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256058
This update corrects a visual issue in the mass mailing builder where text styling (specifically using the 'text-muted' class) was inconsistently applied based on background colors. The fix ensures that the muted text style is always applied correctly, regardless of the background color used within the builder, resulting in a more polished and predictable user experience.
Original PR description
This commit fixes an issue with the `text-muted` class that gives a specific color to the text based on a background-color. Since the mass_mailing builder is a special case for background colors. The class now gives a specific color no matter what the background color is set when used inside the mass_mailing builder. task-5993139 Forward-Port-Of: odoo/odoo#252419
This update resolves an issue where link colors reverted to the default after using the website editor. The fix ensures that link colors remain as intended, regardless of whether the editor is open or closed, providing a consistent user experience for website content. This improves the visual quality and usability of our website.
Original PR description
Problem: Colored links revert to the default link color after saving and closing the website editor. Cause: The rule forcing links to inherit color from their parent `<font>` element is defined in the `html_editor` module, whose stylesheet is unloaded when the editor is closed, so the rule no longer applies on the frontend. Solution: Add the rule to `website_common.scss` so it applies on the frontend regardless of whether the editor is loaded. Steps to reproduce: 1. Open the website editor. 2. Apply Color to selection. 3. Apply link to the subset of the selection. 4. Save and close the editor. 5. Observe the link reverts to its default color. task-5980854 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256630 Forward-Port-Of: odoo/odoo#253301
This update corrects a visual issue where the table row menu was misaligned in websites using right-to-left (RTL) languages like Arabic. The fix ensures the menu's position is correctly calculated during editor initialization, resolving a display problem for users viewing the system in RTL layouts. This improves the overall user experience for international users.
Original PR description
Problem: In RTL websites, the table row menu is not placed correctly. Cause: The `inlineStartOffset` calculation in `table_menu` depends on the `direction` parameter, which was not passed during the…
Problem: In RTL websites, the table row menu is not placed correctly. Cause: The `inlineStartOffset` calculation in `table_menu` depends on the `direction` parameter, which was not passed during the editor initialization. Solution: Ensure the `direction` parameter is properly passed during editor initialization so the `inlineStartOffset` is computed correctly in RTL layouts. Before: <img width="1091" height="682" alt="image" src="https://github.com/user-attachments/assets/964903b2-d33b-48aa-86c2-632cc5adac9a" /> After: <img width="1093" height="658" alt="image" src="https://github.com/user-attachments/assets/846fd39c-1114-408d-a1f4-75b27218b9b0" /> Steps to reproduce: - Change website language to Arabic. - Add a text block and insert a table inside. - Hover over the first table row. - Observe the row menu is misplaced. opw-6049260 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256045
This update resolves a minor issue with the HTML editor's color selector, ensuring more consistent test results. Because the toolbar is a popover, it was susceptible to unpredictable behavior. This fix improves the reliability of the HTML editor's testing process.
Original PR description
The toolbar is a popover and is therefore affected by [1]. runbot-242071 [1] 54da715 Forward-Port-Of: odoo/odoo#256783
This update resolves an issue where searching for inactive accounts by their code didn't return results. The fix adjusts the search criteria to correctly include inactive accounts, ensuring accurate search functionality within the chart of account. This improves data accessibility and reporting.
Original PR description
# How to reproduce - Go to the chart of account - Archive any record (e.g. Code 101401) - Search with the filters : - Inactive Accounts - Account: 101401 (the code of the record) # The problem The…
# How to reproduce
- Go to the chart of account
- Archive any record (e.g. Code 101401)
- Search with the filters :
- Inactive Accounts
- Account: 101401 (the code of the record)
# The problem
The record that we searched for is not shown
# Cause
The domain for the "Account" filter is the following : https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/views/account_account_views.xml#L147
And this is the domain for "Inactive Accounts":
https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/views/account_account_views.xml#L159
This is correct and the search should return what we wanted, but the code's search is overriden by:
https://github.com/odoo/odoo/blob/87c5f562e32ffb58359cf068124e03ead1a5859c/addons/account/models/account_account.py#L383-L384
And the search with the `code_store` domain only explicitely looks for accounts that are active, so our "[('active', '=', False)]" is essentialy ignored
This is fixed in 19.1 because this commit (https://github.com/odoo/odoo/commit/de959adf7c806e09864b52fec78d981e66804280) replaced the custom search by a `compute_sql`
# Proposed solution
We change the search with the `code_store` to look for records that are both active and inactive, since the active value will be handled by the parent search
opw-6059404
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#256939
Forward-Port-Of: odoo/odoo#256060This update fixes a crash that occurred when settling subscription orders through the Point of Sale (PoS) system. The issue stemmed from incorrectly processing discount lines, leading to a template error. The fix now correctly handles these discount lines as notes, ensuring smooth PoS transactions.
Original PR description
**Steps to reproduce:** - Make a subscription product - Make a quotation with it, confirm it, then invoice it - Go back to the sale order and upsell it - Add another product - Go to the PoS to settle the order - A traceback appears **Why the fix:** Why tried to treat the informative line that says that this is a discount as a normal pos order line. We then tried to access the line's template, which caused a crash as the line's template was undefined. We now treat the line as we do a note, meaning to add it to the previous line in the order. We create a function to check if the line is a note and we override it in the **pos_sale_subscription** module. Enterprise PR: https://github.com/odoo/enterprise/pull/107002 opw-5582448 Forward-Port-Of: odoo/odoo#256378 Forward-Port-Of: odoo/odoo#247846
This update corrects a technical issue that prevented snailmail reports from being sent correctly when users lacked sufficient access to company data. The fix now grants elevated access (sudo) to the IAP account, ensuring reports can be processed without errors. This improves the reliability of the snailmail feature.
Original PR description
Issue: Before this commit, when sending a follow up report by post, an access error is thrown if the user doesn't have enough access to read from res.company model Fix: Access the IAP account as sudo opw-6050041 Forward-Port-Of: odoo/odoo#255959 Forward-Port-Of: odoo/odoo#255431
This update corrects a minor issue in how Odoo identifies PDF files. Previously, the system was overly restrictive in recognizing PDF mimetypes, potentially causing problems with certain files. This change restores the ability to handle PDF mimetypes with optional parameters, ensuring broader compatibility and accurate file processing.
Original PR description
The structure of a MIME type commonly consists of just two parts: a type and a subtype, separated by a slash (`/`), but optionally it can also contains parameters to provide additional details (`type/subtype;parameter=value`). This commit restores this nuance in the PDF mimetype check that was made stricter in the commit odoo/odoo@b048078971f4f12307740a8b382b762a35983059. Reference: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types runbot-241165 Forward-Port-Of: odoo/odoo#256804
This update fixes an issue where purchase order descriptions weren't accurately displaying the correct vendor code and name. The underlying system logic was flawed, leading to inconsistent descriptions. The fix ensures that vendor details are consistently reflected in purchase order descriptions, improving order clarity and accuracy.
Original PR description
How to reproduce : - Create a product - Create an attribute with a value set to "free text" - Add 2 different vendors to the purchase tab of the product with different Vendor Code and/or Vendor Name…
How to reproduce : - Create a product - Create an attribute with a value set to "free text" - Add 2 different vendors to the purchase tab of the product with different Vendor Code and/or Vendor Name - Put Dropship as the route for the product to create a PO on a SO confirmation - Create a SO with that product - Confirm the SO and go to the PO - Change the vendor in the SO The problem : The Vendor Code and/or Vendor Name does not change correctly in the product description Why : The way the description generation for a change in a purchase order line works as follows : Create a collection of default descriptions based on the product and the different vendors. If the collection contains the current description, it means the description was not changed by the user and it can be modified. This is done to prevent resetting a custom description made by an user. This logic is pretty broken because the code that generate the description when going from a PO to a SO and the code that generate the description when changing the PO partner are different. This makes it so the current description is almost never found in the list of default descriptions. It looks tempting to try to "resynchronize" those part of the code so the description generation is the same in both cases. This would be done by overriding the _get_product_purchase_description method in the purchase_stock module and using the product_description_variants field. Sadly, this does not work because it conflicts with the purchase_product_matrix module and its own override of that method. The fix that I implemented checks that the Vendor Code and Name are the right one every time the description is computed following a change. opw-5888233 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256665 Forward-Port-Of: odoo/odoo#247330
This update fixes an error in the AVCO audit report that was miscalculating added value, leading to incorrect financial reporting. The change ensures the AVCO value is correctly updated based on the last incoming stock movement, improving the accuracy of inventory valuation. This resolves a discrepancy in reported values for purchases and deliveries.
Original PR description
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to…
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to recalculate the
`added_value`.
On the other hand, the `added_value` should not be recomputed from the AVCO value on ingoing moves.
Source of those changes: [245141](https://github.com/odoo/odoo/pull/245141)
Steps to reproduce the issue:
1. Create a new product. Do not assign it to a category yet.
2. Set the cost (standard_price) to 10$ on the product form.
3. Add 10 units to inventory.
4. Sell and deliver 5 units to a customer.
5. Purchase 10 units at 25$/ea and validate the receipt.
6. Sell and deliver 5 units to a customer.
7. Assign the product to category with AVCO cost method.
8. Go to the AVCO justification report:
- The added value on the purchase is incorrect: 200$ instead of 250$.
- On the last delivery: the added value is -125$ and the AVCO increases from 20$ to 25$.
Ticket: opw-5921104
Forward-Port-Of: odoo/odoo#252239This update resolves issues preventing users from correctly completing the mass mailing onboarding tour and fixes a display problem in the mass mailing builder. Specifically, the tour now guides users through the necessary steps, and text overflows in the builder are now properly wrapped for better readability.
Original PR description
## [FIX] mass_mailing: fix broken tour This commit fixes issues with the mass_mailing onboarding tour. The resolved issues are: * Subject tour step not properly handled: changed "click" to "edit" * Tour steps when theme is selected not shown: updated the trigger so that they are displayed. ## [FIX] mass_mailing: fix overlow-wrap This commit fixes an issue with the overflow-wrap behavior in the mass_mailing builder. By default the editor removes the overflow-wrap which sets its value to `normal`. This value makes it so that the text isn't wrapped if a word overflows the box its in. Now, the editable in the mass_mailing builder has the property set to `break-word` which is the wanted behavior. task-5974184 Forward-Port-Of: odoo/odoo#252405
This update fixes a labeling issue with the 0% VAT rate for sales outside the EU in Sweden. The tax name has been corrected to '0% EX RS' and linked to the appropriate grid, ensuring accurate reporting and compliance with Swedish tax regulations. This change improves the accuracy of financial data.
Original PR description
Currently, the tax for "VAT Sale of service outside EU 0%" has the 0% EU RS name and is associated with the se_39 grid. Since it is for outside the EU, it's name should be 0% EX RS and the grid should be se_40 opw-5798152 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256659 Forward-Port-Of: odoo/odoo#251750
This update resolves an issue where users would encounter access errors when creating private tasks. The fix ensures that a user is automatically added as a task follower upon creation, granting them necessary access rights regardless of the task's project association. This improves the usability of private task creation.
Original PR description
When users would follow the following step as they are makeing a private task, they would be hit by an incorrect access error. Steps to reproduce: 1.Open the form view to create a new task. 2.Clear…
When users would follow the following step as they are makeing a private task, they would be hit by an incorrect access error. Steps to reproduce: 1.Open the form view to create a new task. 2.Clear the Project field. When empty, it should display the Private placeholder. 3.Ensure no user is assigned to the task. 4.Create the private task. 5.An access rights error occurs, stating that the user does not have permission to create the record. ⚠️ Note: This access rights error only occurs when the task is created directly as private. If a task is created normally and then its project_id and user_ids are removed afterward, no access rights error occurs. Root cause: When a task is created without a project_id and without assigned users, Odoo checks access rights on creation. Since no project members or assigned users exist, no user has access to the record, including the creator. This results in an access rights error during creation. This issue does not occur when modifying an existing task because, after creation, the creator is automatically added as a follower. As a follower, the creator retains access to the task even if it has no project and no assigned users. Fix (implemented): Tasks that have no assigned users and are not linked to any project (private tasks) did not make sense, as they were effectively assigned to nothing. To address this, we now require at least one user to be assigned to a task when it is not attached to a project. This change was made inside of the "project_task_view.xml" file in the "view_task_form_2" record Versions : 17.0 -> master Task [5403926](https://www.odoo.com/odoo/project/4105/tasks/5403926) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257050 Forward-Port-Of: odoo/odoo#242216
This update enhances the accessibility of the website builder by ensuring option containers are properly navigable with the keyboard. The changes fix a previous issue where users couldn't easily expand or collapse option groups, and also adds a preview overlay when focus moves within options, improving the overall user experience.
Original PR description
Commit 64d35ccd6fade9e0473686b8484f561b5f4215ce added folding for groups of options when the user clicks on the name of the snippet above the group of option. This commit brings improvement to make it accessible: - use the `button` tag when the label can be clicked - use correct attributes for the arrow (no `role` and `aria-hidden`) Steps to reproduce: - Open website builder - Click on an element with options - Bugs: - The label is not focusable with the keyboard, so it's impossible to fold/unfold a container - The arrow icon should not have `role="img"` and it should have `aria-hidden="true"` (as it's just decorative) task-5993202
This update resolves a technical issue causing errors in the 'Actual Margins' report, specifically when generating reports for billable projects. The fix corrects a misconfiguration in the report's data access, ensuring the report functions reliably across both Enterprise and Community editions. This improves data accuracy and prevents disruptions for users generating these reports.
Original PR description
Steps to reproduce: - Bug 1: 1. Create a billable project linked to a Sales Order. 2. Invoice the Sales Order. 3. Open the "Actual Margins" report from the project. 4. Click a value in "Revenues (Fixed Price)". 5. Open a record from the list. - A traceback occurs with KeyError on account.analytic.line. Bug 2: 1. Open the "Actual Margins" report in Odoo Community edition. - It throws a traceback: "View type grid not found in act_window action". Cause: - Bug 1: In `action_open_account_analytic_line_origine`, the `res_model` in the action dict is set to a recordset instead of a model name string. Bug 2: The `grid` view type (Enterprise only) was incorrectly included in the `view_mode` field of the Community action. Fix: - Bug 1: Use `._name` to pass the model name instead of the recordset. Bug 2: Remove `grid` from `view_mode` as the Enterprise module already adds it via an `ir.actions.act_window.view` record. task-6085406
This update fixes an issue where URLs in emails were incorrectly encoded, potentially leading to display problems. The change utilizes modern URL handling techniques for accurate URL representation, ensuring correct links are displayed to users. This improves the reliability of email communications.
Original PR description
Before this commit, the URL was fully encoded using encodeUrl. This commit replaces this approach with the more modern [URL api](https://developer.mozilla.org/en-US/docs/Web/API/URL), which [handles encoding](https://url.spec.whatwg.org/#dom-url-href) properly. This commit also removes decodeUrl. It was possible for a user to send a URL and have a different one displayed in the UI due to decoding. Task-6041689 Forward-Port-Of: odoo/odoo#256850 Forward-Port-Of: odoo/odoo#254383
This update resolves an issue where users would encounter an error when attempting to save a report with an empty XML format. The fix prevents the system from attempting to process invalid XML data, ensuring reports can be saved correctly. This improves the user experience and prevents data corruption.
Original PR description
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External…
Currently an error is generated when the user tries to save a report with an empty XML format. Steps to reproduce: - Install web_studio and sale_management - Sales > Studio > Reports > New > External > Type Text in report - Save > Edit Sources > Remove full XML > Save Error: `XMLSyntaxError:Document is empty, line 1, column 1 (<string>, line 1)` This error occurs because line [1] in `web_editor` attempts to access nodes by using `etree.fromstring()` with an empty `view.arch`, which is empty, resulting in an error. In earlier versions, this error was already handled by the `_check_xml` constraint, which raised a validation error when an `etree.ParseError` occurred while parsing `etree.fromstring(view.arch)` with an empty `view.arch` (see code reference [2]). However, recent changes introduced in commit [3] allow `view.arch` to be empty. As a result, this error is no longer handled by the constraint. This commit fixes the issue by adding a condition to prevent calling `etree.fromstring()` when `view.arch` is empty, avoiding attempts to access nodes from invalid data. It also updates the logic in the `web_studio` module's `get_xml_editor_resources` method to ensure resources are processed only when a valid view architecture is available. [1]: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/web_editor/models/ir_ui_view.py#L367 [2]: https://github.com/odoo/odoo/blob/75ca0fec9a0d3b1e3a05a8bf3101bbe21846ac7a/odoo/addons/base/models/ir_ui_view.py#L372-L377 [3]: https://github.com/odoo/odoo/commit/8334ea5c777e5a478f12b8bb7a2f54bcae537d0f sentry-6288795955 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256009 Forward-Port-Of: odoo/odoo#255316
This update fixes an issue where sale order prices weren't accurately reflecting the original, undiscounted amount, particularly when discounts were applied. The change ensures that the base price is calculated correctly, excluding any discount lines, leading to more precise order pricing and improved financial reporting. This resolves a previous bug reported by our team.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245246
This update resolves an issue where users couldn't close popups using the Escape key. The fix ensures the correct Bootstrap event handler is triggered, regardless of whether the popup contains interactive elements. This improves the user experience by providing a reliable way to close popups.
Original PR description
Steps to reproduce: =================== - Add a Popup snippet to a page - Remove all links/buttons inside the popup - Save and wait for the popup to appear - Press ESC -> Nothing happens. Cause:…
Steps to reproduce:
===================
- Add a Popup snippet to a page
- Remove all links/buttons inside the popup
- Save and wait for the popup to appear
- Press ESC
-> Nothing happens.
Cause:
======
https://github.com/odoo/odoo/blob/a922c31fa7ccd1107b31287ab1f75697fae874f8/addons/website/static/src/snippets/s_popup/000.js#L219-L226 when the popup contains no tabbable elements, `this.el.focus()` was called. `this.el` refers to the `.s_popup` div, not the `.modal` element that Bootstrap monitors for keyboard events. As a result, the ESC keydown event never reached Bootstrap's handler and the modal stayed open.
When focusable elements (links, buttons) were present, `tabableEls[0].focus()` correctly focused an element inside `.modal`, so ESC worked fine in that case.
Solution:
=========
Replace `this.el.focus()` with `this.el.querySelector(".modal").focus()` so focus lands on the `.modal` element allowing Bootstrap's built-in ESC handler to fire correctly in all cases
opw-5891054
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#254284
Forward-Port-Of: odoo/odoo#250050This update resolves several issues with the live chat transcript, ensuring that deleted messages are displayed correctly, attachments are shown, and guest avatars are accurate. The transcript size limit has also been removed, providing a better user experience. This improves the overall functionality and reliability of the live chat feature.
Original PR description
Before this commit, the live chat transcript had some issues: - Delete messages were shown as an empty bubble. - Attachments were not shown. - Guests avatar was incorrect. - Transcript was limited to 600px, while there is no reason to do so. This commit fixes all the above issues. task-6008968 ||| |-|-| |Before|| |After||
This update resolves an issue where marketing emails sent in RTL languages (like Arabic) were incorrectly rendered as left-to-right. The fix re-applies the correct language direction styling to ensure emails are displayed accurately, regardless of the user's language settings. This improves the user experience for international customers.
Original PR description
**Steps to reproduce:** - Install Mail Marketing app - Change user language to a RTL language (such as Arabic) - Create a marketing campaign with RTL content - Send it - Mail received changes from…
**Steps to reproduce:**
- Install Mail Marketing app
- Change user language to a RTL language (such as Arabic)
- Create a marketing campaign with RTL content
- Send it
- Mail received changes from RTL to LTR
**Issue:**
Conversion doesn't take into account the current
language direction anymore when creating the inline
styling. This keeps the mails in the default format ('ltr').
Previously the inline conversion was using the `/portal/static/src/scss/portal.scss`
to set the html body text direction using the `rtlcss` library:
```css
// Frontend general
body {
// Set frontend direction that will be flipped with
// rtlcss for right-to-left text direction.
direction: ltr;
}
```
It was used during the inline conversion in a `CSSStyleRule`
after loading the doc sheets, and added with the `.o_layout` selector:
```js
if (selector === "body") {
// The top element of a mailing has the class
// 'o_layout'. Give it the body's styles so they can
// trickle down.
cssRules.push({
selector: ".o_layout",
rawRule: subRule,
specificity: 1,
});
}
```
But recent refactor reworked the styling assets used by
this process, which removed this behavior.
**Fix:**
Keep style `direction` (instead of `dir` attribute) like
before, to avoid compatibility issues in mail engines.
This is done by reapplying the body rule on the
mass_mailing iframe styling, but it could also be manually
added to the fragment itself using the editor current config
or localization.
related: https://github.com/odoo/odoo/commit/354b8f60dbabcfac690d90bf657592e1347e4f86
opw-5982854
Forward-Port-Of: odoo/odoo#255628This update fixes an issue where URLs resembling phone numbers were incorrectly interpreted as phone links. The change strengthens the regex used to identify phone URLs, preventing unintended 'tel:' protocol additions. This ensures URLs are correctly linked to pages, improving user experience.
Original PR description
# How to reproduce - Add a new website page with a title that ressembles a phone number (3-14 does the trick even though it does not really look like a phone number) - Go to another page in edit mode…
# How to reproduce
- Add a new website page with a title that ressembles a phone number (3-14 does the trick even though it does not really look like a phone number)
- Go to another page in edit mode
- Select a button
- In the "Enter URL, /page, or #anchor" input, write the url to your page (/3-14)
- Click on Apply
# The problem
Instead of a link to our page, the button has a link with a tel: protocol.
# Cause
When clicking on the Apply button, the `applyDeducedUrl()` function will be run.
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/link_popover.js#L294
That function will change the selected url with the URL deduced from `deduceURLfromText()` if any is found. In our case "/3-14" matches the `PHONE_REGEX` pattern so the url is prefixed with the tel: protocol.
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/utils.js#L71
https://github.com/odoo/odoo/blob/892b15963625acc89b7ed7b1c6f94392111df6be/addons/html_editor/static/src/main/link/utils.js#L34
That regex is a bit too permissive and allows our "/3-14" to be matched even though it starts with "/".
Side note : cases like "( )", "...", "--)" are also a match, which is not really an issue because they do not really represent anyting but it shows that the regex is not strict enough.
# Proposed solutin
We edit the regex to make it so it only matches strings that have atleast a digit and where the first character (after "+") is a digit or "("
opw-6047571
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#255877