Daily updates from Odoo
Thursday, February 20, 2025
56 changes · 18.0
Enhancements to existing features
Point of Sale screens can now use a simplified HTML editor for restaurant appointment fields, making it easier to edit formatted content directly in POS. The update also prevents errors when the editor runs in this lightweight mode without media features enabled.
Original PR description
### Commit 1 In the point of sale environnement we want to be able to edit html field in a minimal way. So only core plugins are added to the html_editor. As we have a special assets environnement…
### Commit 1
In the point of sale environnement we want to be able to edit html field
in a minimal way. So only core plugins are added to the html_editor.
As we have a special assets environnement for the point_of_sale we can
directly patch the main `htmlField` definition without impacting main
assets of Odoo.
So in Order to make it work we need to remove the preventDefault on
backspace key at the initialization of PoS.
Enterprise: 79703
### Commit 2
The html editor should only work with the “CORE_PLUGINS” plugin set.
But when an HTML field is used only with this Set a traceback is raised
because the “MediaPlugin” plugin is missing.
This is due to this piece of code:
```js
async getEditorContent() {
await this.editor.shared.media.savePendingImages();
return this.editor.getElContent();
}
```
Each time an HTML input is unfocused, this method is called and attempts
to save the pending images. The problem is that media.savePendingImages
depends on the “MediaPlugin”.
A quick fix is made in this commit by adding a question mark after media
to avoid traceback if the plugin is missing.Restaurant appointment screens in Point of Sale can now offer simple HTML text editing. This lets staff make light formatting changes where needed while keeping the POS experience streamlined and avoiding changes to the wider Odoo interface.
Original PR description
In the point of sale environnement we want to be able to edit html field in a minimal way. So only core plugins are added to the html_editor. As we have a special assets environnement for the point_of_sale we can directly patch the main `htmlField` definition without impacting main assets of Odoo. Community: 198482
Planning emails now include shifts scheduled on weekends, so recipients get a complete view of their work schedule. This helps avoid missed assignments and improves communication for teams that operate on Saturdays or Sundays.
Original PR description
Issue: Steps To reproduce: Solutions: opw-4378797
Resolved issues and error corrections
This fix prevents Odoo from failing when reading document data that is not encoded in UTF-8. It improves reliability for users accessing certain stored documents through document searches or integrations.
Original PR description
Since [this first commit], reading bytes not encoded in UTF-8 raises an error. The problematic code was moved from odoo/tools/date_utils.py to odoo/tools/json.py by [this other commit] after the bug was introduced. Steps to reproduce: - Install the documents app. - Call search_read on documents.document to read the raw field. => A UnicodeDecodeError is raised on some documents. The `ustr()` function is deprecated, so the fix is just about using the same logic. As it is impossible to guess the encoding of the bytes, we try to decode them with common encodings. [this first commit]: https://github.com/odoo/odoo/commit/6a68e93f924cc78ba15bc78d981b1bf115e57a0d [this other commit]: https://github.com/odoo/odoo/commit/5ef4c07ada1b47cd08a0fc7a2dd626f92d79b715 opw-4457853
The restaurant point-of-sale tests now use a more precise way to confirm the printed receipt header. This helps reduce false test failures and supports more reliable validation of receipt printing behavior.
Original PR description
Before this commit: ============== - Receipt header time check relied on a trigger. After this commit: ============ - A custom selector is used to verify the printed receipt header. runbot Error: 134719
This fixes demo data for the India localization so sample company and accounting setup work as expected. It helps users and testers see accurate example data when evaluating or setting up the India-specific Odoo configuration.
Original PR description
related - https://github.com/odoo/enterprise/pull/79690 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Order change receipts in Point of Sale now correctly show the table name or number. This helps restaurant staff identify which table an order update belongs to, reducing confusion during service.
Original PR description
Before this commit, the table name (number) would not be shown on an order change reciept, as table_id?.name was always undefined. We now use the getName() funtion to retrieve the correct table name. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Inventory route rules now show the correct helper information when users change the supply method. This helps warehouse and inventory users choose the right routing behavior with clearer, context-specific guidance.
Original PR description
Problem: The complementary information were not displayed on the form view of a rule in a route. These informations are supposed to change depending on the Supply Method that has been selected, but since version 18, they always displayed the same information. The suffix, which is used to give information depending on the Supply Method, is not being used anymore and needs to be displayed again. Steps to reproduce: - Go to a route in Inventory and pick a rule - With Pull From set as Action, change the Supply Method - The helper on the right won't change but it should Fix: The suffix was added to the message that has to be displayed. opw-4511907
Portal users can now open invoices that include early payment discounts without seeing an access error. This keeps customer self-service invoice access working when discounted payment terms are used.
Original PR description
Steps to reproduce: ------------------- - Create an invoice and set the partner to a portal user. - Set the payment term to any payment term with an early discount option and confirm the invoice. - Log in as the portal user and view my invoices, you will get an error message that you aren't allowed to access "Partial Reconcile" records Cause: ----- Since #182656, access to the payment_terms was added to the _is_eligible_for_early_payment_discount method, to allow applying the early discount for in_payment invoices. Fix: --- Add sudo qualifier to the payment_terms access to allow this function to be called by portal users. opw-4535621 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Restaurant point of sale users can now split and pay an order from one device even when the same table was updated from another device. The fix prevents the app from crashing when the same order line deletion is received more than once during device synchronization.
Original PR description
Steps to reproduce: =================== - Open the restaurant registry from 2 devices A and B - From device A, open a table, add a product, go back to floor plan - From device B, choose the same…
Steps to reproduce: =================== - Open the restaurant registry from 2 devices A and B - From device A, open a table, add a product, go back to floor plan - From device B, choose the same table, click split, choose the product added from device A, and click on pay. Reason: ======= We are trying to delete the same record 'pos.order.line' twice, i.e. we're calling `processDeletedRecords` twice with the same record id [1], so it succeds the first time, and it removes the record from the frontend cache, but when trying to process the deletion the second time, it fails since the record doesn't exist in the cache anymore [2], and hence, the `record` object is `undefined` in the second call to `delete_` with the same record id, causing the traceback [3]. The reason we're calling `processDeletedRecords` twice with the same record id is because `sync_from_ui` is issuing 2 sync events at the same time [4], since it's been passed 2 orders when splitting [5]. Fix: ==== Since it's an urgent bug, this fix just skips deleting the record if it doesn't exist, without "fixing" the root cause of syncing event being issued twice. [1]: https://github.com/odoo/odoo/blob/2d0ed96675541a88d9132bd01d33730f72c79d1d/addons/point_of_sale/static/src/app/store/devices_synchronisation.js#L116 [2]: https://github.com/odoo/odoo/blob/eca835a10d027b936890ff6ccc9e02660edfdfd5/addons/point_of_sale/static/src/app/models/related_models.js#L691 [3]: https://github.com/odoo/odoo/blob/eca835a10d027b936890ff6ccc9e02660edfdfd5/addons/point_of_sale/static/src/app/models/related_models.js#L664-L665 [4]: https://github.com/odoo/odoo/blob/eca835a10d027b936890ff6ccc9e02660edfdfd5/addons/point_of_sale/models/pos_order.py#L1043-L1046 [5]: https://github.com/odoo/odoo/blob/0faf168bbcbc66daeb58999a6222cd2c6d41134c/addons/pos_restaurant/static/src/app/split_bill_screen/split_bill_screen.js#L167 opw-4562134
This update fixes a Point of Sale test issue where customer searches could match the wrong contact due to overlapping phone numbers. It helps keep automated checks reliable so future Point of Sale changes can be validated with fewer false failures.
Original PR description
In this commit: ========== - Updated the test case for test_customer_all_fields_displayed. The test previously found multiple partners with the same phone number because the ID Company's phone was `+62 812-345-678`, while the test phone was `1234567890`. To resolve this, we have updated the test phone number to `9898989899`. Runbot Error- 116844, 116845
Point of Sale order validation now stops if payment processing fails or the order is not fully paid. This helps prevent orders from being incorrectly marked as paid, reducing the risk of financial discrepancies.
Original PR description
Before this commit, _process_saved_order caught errors from action_pos_order_paid and logged them. This meant that even when payment processing failed, the order state could be set to "paid", leading to financial discrepancies. Removing the try-catch block now stops order validation when payment is incomplete, ensuring orders are only marked as paid when fully confirmed. opw-4487123 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now create a discussion thread from a file shared without accompanying text. This prevents an error in Discuss and keeps collaboration flows working smoothly when files are shared on their own.
Original PR description
This error occurs when a user sends a file without a message, and `Create Thread`. Step to Reproduce : - Install and open module `Discuss`. - Open Channel and send any file from `Attach files` without a message. - Hover over the sent file, click on `Expand`, and then click `Create Thread` AttributeError: 'str' object has no attribute 'striptags' This issue occurs when data is `str` instead of an HTML object. This commit fixes the error by ensuring .striptags() is only used when the data is in the correct format. sentry - 6304779383 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where adding a banner at the top of editable content could create an unwanted blank line and allow typing in the wrong place. The editor now uses an empty paragraph instead, keeping banner placement cleaner while preserving mouse selection behavior in Chromium-based browsers.
Original PR description
Before this commit and since [1], when inserting a banner at the top of the editable, a zero-width space (ZWS) was inserted before the banner to circuvent a Chromium bug that prevents fully selecting the banner with the mouse [2]. This led to the undesirable behavior of having a text node (with a ZWS) as the first child of the editable, creating a line above the banner and allowing for text insertion at the editable's root. This commit replaces the ZWS insertion with an empty paragraph, which can be later be moved around by the user. [1]: https://github.com/odoo/odoo/commit/a0fcba694a8a23a947ba28d188d6806272627447 [2]: https://issues.chromium.org/issues/40822311 task-4512959
The website tour test no longer depends on demo company information being present. This makes validation more reliable for databases created without demo data, reducing false build failures.
Original PR description
The tour requires the commercial_company_name to be 'yourcompany' which is not the case when demo data is not installed. https://runbot.odoo.com/odoo/runbot.build.error/116103
This fix removes an unintended extra border line from rating images. It improves the visual presentation of ratings without changing how the rating feature works.
Original PR description
Description of the issue/feature this PR addresses: The o_rating_label css is not properly configured, which caused an unintended extra border line to appear on the rating image This commit removes the border explicitly in the CSS file to correct the visual issue. opw-4482430 Related Commit: https://github.com/odoo/odoo/commit/9e8a709f80e3e4620bfa92decb383781b04d64c8#diff-b7f943d7f11d281f92f78810d7da31d5ab33d4e5952d66ce973d0bc24278ebcd Current behavior before PR:  Desired behavior after PR is merged: The border will be invisible and everything else still functional without any influence --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale search results now display long product names from the beginning instead of cutting off the first words. This makes products easier for cashiers to identify when using the search bar, reducing confusion during checkout.
Original PR description
… search results **Issue:** When performing a search in the PoS search bar, products with long names are displayed in a way that hides the beginning of the name, making it difficult to identify them.…
… search results **Issue:** When performing a search in the PoS search bar, products with long names are displayed in a way that hides the beginning of the name, making it difficult to identify them. **Steps to Reproduce:** 1. Install the Point of Sales app 2. Navigate to Point of Sales > Products 3. Create a product with a name longer than six lines 4. Open the register 5. Search for the product on the search bar 6. Observe that the product name is truncated at the beginning. Expected Behavior: The product name should always be displayed from the beginning, even when searched in the PoS search bar Actual Behavior: When searched, the product name is cut off at the beginning, making it difficult to read **Root Cause** The issue occurs because align-items: center !important; is applied to a higher-level class. While this alignment works well for buttons with short names, it causes unintended truncation for product cards with long names. **Fix** The align-items property is explicitly overridden in the product name’s \<div\> to ensure that only the product name is affected, preventing unwanted truncation. Opw-4561019 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Chat windows now appear in front of document action buttons when they overlap. This prevents buttons from visually floating over conversations, making the interface clearer and easier to use.
Original PR description
When the chat windows overlap the document action buttons, the buttons are floating on top of the chatwindow. This happens because chat window was lower than document actions, which uses `$zindex-dropdown` (`z-index: 1000`). This commit fixes the issue by putting chat window above `$zindex-dropdown`. before/after:   --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Product fiscal details for Brazilian companies now remain in the expected Extra Info section instead of being mixed into the eCommerce Shop section. This keeps product forms clearer and helps users find tax-related information in the correct place.
Original PR description
**Issue** BR fiscal product fields are displayed inside Ecommerce Shop group instead of Extra Info group Steps to Reproduce: 1. Install Accounting, Sales, eCommerce, and l10n_br_avatax modules. 2.…
**Issue** BR fiscal product fields are displayed inside Ecommerce Shop group instead of Extra Info group Steps to Reproduce: 1. Install Accounting, Sales, eCommerce, and l10n_br_avatax modules. 2. Switch company settings from YourCompany to BR Company. 3. Navigate to Products > Sales Tab. 4. Observe that the fiscal information fields appear under the Ecommerce Shop group instead of Extra Info. Expected Behavior: BR fiscal product fields should be displayed inside the Extra Info group. Actual Behavior: BR fiscal product fields are incorrectly placed in the Ecommerce Shop group. **Root Cause** The issue occurs because the code mistakenly modifies the Extra Info group, adds eCommerce-related fields inside it, and then renames it to Ecommerce Shop. This causes the Extra Info group to disappear, leading to fiscal information being displayed incorrectly. **Fix** Instead of modifying the existing Extra Info group, a new separate group is created specifically for eCommerce-related fields. This ensures that fiscal information remains inside the Extra Info group and that eCommerce fields are properly placed next to Ecommerce Media, maintaining UI consistency. opw-4533760 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents helpdesk teams from using working calendars that cannot produce reliable SLA deadlines, such as flexible calendars or calendars without working hours. It avoids ticket creation errors and helps ensure SLA deadlines are only based on valid schedules.
Original PR description
Steps to reproduce: - Let's consider an helpdesk team HT - Let's consider a working calendar WC with flexible hours and no working hours - Set an SLA policy on HT and set WC as SLA schedule - Create a ticket in HT Bug: A traceback was raised because the function plan_hours was called in _compute_deadline with no deadline Expected behavior: With WC in flexible hours, a deadline is computed according to the SLA policies With WC not in flexible hours and not working hours, no deadline is computed (bad configuration) opw:4563223
This fixes sample payroll data for the Indian payroll module so demonstrations and testing use accurate setup information. It helps teams evaluate or showcase the payroll workflow without running into avoidable demo-data issues.
Original PR description
related - https://github.com/odoo/odoo/pull/198328
Intrastat reporting has been updated to include service transactions alongside goods where required. This helps businesses produce more complete compliance reports, especially for Belgian Intrastat declarations involving services.
Original PR description
Backport of https://github.com/odoo/enterprise/commit/379ddbe4a0a479bd7547877175476230f92b4683 Task: 3926963 Upgrade: https://github.com/odoo/upgrade/pull/7201
This fixes several usability issues in the Documents list view. Users can now edit records without keyboard shortcuts interrupting their work, avoid seeing duplicate Folder information, and update Website and Folder fields when allowed.
Original PR description
This commit fix the following issues: - When editing a record in list view, it wasn't possible to use the space key nor the enter key. The first one was (un)selecting the current line while the second one entered the folder or preview mode when validating the changes. - Folder was present twice in the list view. - Website and Folder are now editable. Task-4558286
Clicking the activity to send a tax report now opens the tax closing move for the relevant date instead of defaulting to the current date. This helps accounting users review and send the correct tax report without confusion or manual date correction.
Original PR description
Before this commit, when we clicked on the activity send tax report. It would result by opening the report at the current date instead of the date of the move. After this commit, the expected behaviour was to open the move of the tax closing. task-4583606
This change lets account chart updates avoid creating extra accounts, taxes, or fiscal positions when they are not wanted. It helps keep localization updates, especially for the Netherlands, more predictable and reduces unintended accounting setup changes.
Original PR description
add force_create in _load function
Features or functions removed from Odoo
This change removes rarely used shortcut options from Odoo's web testing macro tool so each step now uses a direct function for its action. This simplifies the underlying API and makes future maintenance clearer, with no expected impact on everyday business users.
Original PR description
In order to simplify the macro.js API, the action of a step must be a function. The action can then call (Hoot or others) events to interact with the trigger. In any case, it is not useful to have ACTION_HELPERS in macro.js which are only used in very rare cases in the codebase. 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
Code cleanup and technical improvements
This change streamlines how the web automation system handles failures by treating timeouts as a standard type of error. It reduces internal complexity and should make automated tours and related web behavior easier to maintain without changing day-to-day user workflows.
Original PR description
In this commit, we simplify the macro API by removing onTimeout() and keeping only onError(). Timeout is ultimately just one type of error that can happen in macro.js. 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
Documentation and clarification updates
This update records the Corporate Contributor License Agreement for PT Layani Solusi Indonesia and lists its authorized contributors. It supports legal compliance for contributions to Odoo without changing product functionality.
Original PR description
Description of the issue/feature this PR addresses: This PR adds signature of Corporate Contributor License Agreement for PT Layani Solusi Indonesia, including the list of contributors. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
The message "Transferred by <Wave Nb>" was posted on pickings that are detached before the wave is validated. How to reproduce: - Create Product P, storable, with 2 unit on hand - Create 2 delivery transfer for 1 unit of P each - Add both transfer to new wave - Set Picked to True on 1 of the move, and not on the other. - Validate the wave transfer => 1 transfer only is validated (OK), but both have a message saying that the transfer was "Transferred by <Wave Nb>" Removed `skip_immedi
Original PR description
The message "Transferred by <Wave Nb>" was posted on pickings that are detached before the wave is validated. How to reproduce: - Create Product P, storable, with 2 unit on hand - Create 2 delivery transfer for 1 unit of P each - Add both transfer to new wave - Set Picked to True on 1 of the move, and not on the other. - Validate the wave transfer => 1 transfer only is validated (OK), but both have a message saying that the transfer was "Transferred by <Wave Nb>" Removed `skip_immediate` context as it is obsolete, and allow the function to only have 1 return statement, which is needed for the fix. OPW-4503809 Forward-Port-Of: odoo/odoo#195757
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation outside the link is already blocked. **Example**: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `/ZWS/ab[]c</a></div>` Pressing the left arrow key repeatedly places the cursor at the start of `a`, before `feff`: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `[]/
Original PR description
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation…
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation outside the link is already blocked. **Example**: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `/ZWS/ab[]c</a></div>` Pressing the left arrow key repeatedly places the cursor at the start of `a`, before `feff`: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `[]/ZWS/abc</a></div>` This forces an extra left-arrow press to move past `a`, which is redundant since only the link itself is editable. **Solution**: Wrap links with `feff` only if their parent element is `contenteditable=true`. **Steps to Reproduce**: 1. Add a Form snippet. 2. Focus on the "Submit" button. 3. Press the "Home" button to move the cursor to the start. 4. Press the right arrow key twice. - **Expected**: Cursor moves after the first visible char. - **Issue**: Cursor stops prematurely before the character. opw-4505962 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195704
In the survey stats, the number of votes for a multiple choice answer displayed the label "Votes" without it being translatable. This commit makes it translatable. [task-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/odoo#197157 Forward-Port-Of: odoo/odoo#196704
Original PR description
In the survey stats, the number of votes for a multiple choice answer displayed the label "Votes" without it being translatable. This commit makes it translatable. [task-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/odoo#197157 Forward-Port-Of: odoo/odoo#196704
Versions -------- - 17.0+ Steps ----- 1. Have a PNG image with a transparent background; - e.g. https://odoocdn.com/openerp_website/static/src/img/assets/png/odoo_logo.png 3. use it as main image for a product; 4. upload it again as extra image via the website editor; 5. enable click on zoom for the images; 6. click on the images. Issue ----- - The main image gets displayed with a black background. - The extra image gets displayed with a white background. Cause ----- -
Original PR description
Versions
--------
- 17.0+
Steps
-----
1. Have a PNG image with a transparent background;
- e.g. https://odoocdn.com/openerp_website/static/src/img/assets/png/odoo_logo.png
3. use it as main image for a product;
4. upload it again as extra image via the website editor;
5. enable click on zoom for the images;
6. click on the images.
Issue
-----
- The main image gets displayed with a black background.
- The extra image gets displayed with a white background.
Cause
-----
- The `img` element of the main image has the `bg-black` class.
- PNG images uploaded via the `website_sale` editor get converted to WEBP, and then drawn on a white canvas before getting stored.
Solution
--------
- Remove the `bg-black` class from the `img` element.
- When converting to WEBP, use a transparent canvas.
- Do the same for WEBP images uploaded via `ImageField`.
opw-3848324
Forward-Port-Of: odoo/odoo#197603**Issue:** When splitting an expense, all products are available to define the split expense categories.  **Expected:** The wizard should only display products related to `Expense Categories` to keep consistency with base expense creation. **Steps to reproduce:** - Activate Expense app; - Create a new expense; - *(opt) Try changing the expense category and see av
Original PR description
**Issue:** When splitting an expense, all products are available to define the split expense categories.  **Expected:** The wizard should only display products related to `Expense Categories` to keep consistency with base expense creation. **Steps to reproduce:** - Activate Expense app; - Create a new expense; - *(opt) Try changing the expense category and see available categories to compare;*  - Save and click `Split Expense`; - In the `Product` column, select a product not listed in `Expense Categories` (cf. optional step); - Split expense and see the new expenses having the normally unavailable product as category.  **Cause:** All products are retrieved by the wizard, unlike the category field of the base `hr_expense`. **Fix:** Add restrictive domain as for base `hr_expense`. https://github.com/odoo/odoo/blob/573cbe3b19e91a134ee65168b3021437a39b6093/addons/hr_expense/models/hr_expense.py#L57 <img width="1439" alt="Capture d’écran 2024-12-16 à 16 32 57" src="https://github.com/user-attachments/assets/c9fa8b43-bd7b-4ab3-8759-b4d6a0e269d6" /> opw-4357521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197399 Forward-Port-Of: odoo/odoo#190738
**Behavior before PR:** When user edits link and inserts 3 or more digits, link url gets converted to telephone url. This happens because in sanitize.js `deduceURLfromText` method converts url to telephone url if label matches the regex. **Behavior after PR:** Now, inserting 3 or more digits will not convert existing url to telephone url directly. If current link is telephone url or label starts with `"tel:"` prefix then url will get converted to telephone url if label matches the `PHO
Original PR description
**Behavior before PR:** When user edits link and inserts 3 or more digits, link url gets converted to telephone url. This happens because in sanitize.js `deduceURLfromText` method converts url to telephone url if label matches the regex. **Behavior after PR:** Now, inserting 3 or more digits will not convert existing url to telephone url directly. If current link is telephone url or label starts with `"tel:"` prefix then url will get converted to telephone url if label matches the `PHONE_REGEX`. task-4173806 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197701 Forward-Port-Of: odoo/odoo#193420
Currently, an exception is raised when evaluating multiple records, where some records are complete and correct while others contain errors. error: ```ValueError KeyError(account.move(43,)) while evaluating 'if records:\n action = records.action_l10n_my_edi_send_invoice()' ``` [1]- https://github.com/odoo/odoo/blob/8eacfdcc2b65c62848d7939121c64928b76a80ed/addons/l10n_my_edi_extended/models/account_move.py#L181 [2]- https://github.com/odoo/odoo/blob/8eacfdcc2b65c62848d79391
Original PR description
Currently, an exception is raised when evaluating multiple records, where some records are complete and correct while others contain errors. error: ```ValueError KeyError(account.move(43,)) while evaluating 'if records:\n action = records.action_l10n_my_edi_send_invoice()' ``` [1]- https://github.com/odoo/odoo/blob/8eacfdcc2b65c62848d7939121c64928b76a80ed/addons/l10n_my_edi_extended/models/account_move.py#L181 [2]- https://github.com/odoo/odoo/blob/8eacfdcc2b65c62848d7939121c64928b76a80ed/addons/l10n_my_edi_extended/models/account_move.py#L153 This commit fixes the issue by filtering only those records that have errors during evaluation, and I have added a test for this issue. sentry - 6298401222 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197860
Issue: ====== sperator isn't inserted in the correct place. Steps to reproduce the issue: ============================= - Go to studio - Create a new internal report - Put the cursor in the div (second line) - Add some content over some lines - Insert seperator at the end of the lines - It gets inserted at the start Origin of the issue: ==================== Since we are writing inside the div directly, inserting the hr will look for the closest block and insert it before it whi
Original PR description
Issue: ====== sperator isn't inserted in the correct place. Steps to reproduce the issue: ============================= - Go to studio - Create a new internal report - Put the cursor in the div (second line) - Add some content over some lines - Insert seperator at the end of the lines - It gets inserted at the start Origin of the issue: ==================== Since we are writing inside the div directly, inserting the hr will look for the closest block and insert it before it which is the div. Because, new line inside a div is just a br and doesn't split the div. Solution: ========= Add a p element inside an empty div element when we put the selection there. task-4240730 Forward-Port-Of: odoo/odoo#188087 Forward-Port-Of: odoo/odoo#183129
The 'OU' (Organizational Unit) field is not required for valid certificates. Requiring it will result in a traceback even when a certificate is considered valid. This PR makes the 'OU' field optional. opw-4325514 Forward-Port-Of: odoo/odoo#190508
Original PR description
The 'OU' (Organizational Unit) field is not required for valid certificates. Requiring it will result in a traceback even when a certificate is considered valid. This PR makes the 'OU' field optional. opw-4325514 Forward-Port-Of: odoo/odoo#190508
Consider a recordset of new records, and a loop like ```py for record in records: for line in record.line_ids: line.value ``` The implementation of `record.line_ids` does not actually prefetch all `records`. It actually fetches the field on the records' origin (their corresponding real records), but only assigns the current new record in cache. As the prefetching relies on the cached values of `line_ids`, the prefetching mechanism is actually broken on `line`. The fix cons
Original PR description
Consider a recordset of new records, and a loop like
```py
for record in records:
for line in record.line_ids:
line.value
```
The implementation of `record.line_ids` does not actually prefetch all `records`. It actually fetches the field on the records' origin (their corresponding real records), but only assigns the current new record in cache. As the prefetching relies on the cached values of `line_ids`, the prefetching mechanism is actually broken on `line`.
The fix consists in assigning all the records to prefetch in this case. This does not add unexpected prefetching, since the origin records are prefetched as one batch anyway.
Forward-Port-Of: odoo/odoo#198202
Forward-Port-Of: odoo/odoo#198124Currently, a traceback is occurring when the user tries to click the `plans` smart button in the hr department record. To reproduce this issue: 1) Install hr 2) Open any hr department record 3) Click the `Plans` smart button Error:- ``` ValueError: malformed node or string on line 1: <ast.Name object at 0x7333bacc> ``` This error was occurring because of the latest changes from the below commit, https://github.com/odoo/odoo/pull/196430/commits/ec4991330224784571d850fb87ee7940a07
Original PR description
Currently, a traceback is occurring when the user tries to click the `plans` smart button in the hr department record. To reproduce this issue: 1) Install hr 2) Open any hr department record 3) Click…
Currently, a traceback is occurring when the user tries to click the `plans` smart button in the hr department record. To reproduce this issue: 1) Install hr 2) Open any hr department record 3) Click the `Plans` smart button Error:- ``` ValueError: malformed node or string on line 1: <ast.Name object at 0x7333bacc> ``` This error was occurring because of the latest changes from the below commit, https://github.com/odoo/odoo/pull/196430/commits/ec4991330224784571d850fb87ee7940a071080a We used `literal_eval()` from the below line to evaluate the domain in action. Which contains `allowed_company_ids`. This leads to the above error while evaluating in `literal_eval()`. https://github.com/odoo/odoo/blob/b070f9a4aa179799e3412d18b8faba07349bbf7b/addons/hr/models/hr_department.py#L147-L153 The domain in the action was modified from the below commit recently, https://github.com/odoo/odoo/pull/193572/commits/c2243abca397ab6622ec85e6fe6adbfef0d7c47b We can resolve this issue by replacing the `allowed_company_ids` by accessing the value of `allowed_company_ids` from context. sentry-6285774985 Forward-Port-Of: odoo/odoo#197308
Embedded files with direct paths in knowledge article templates cannot be viewed or downloaded. ### Steps to Reproduce 1. Install the `knowledge` module. 2. Open the default knowledge article (e.g., *Welcome Mitchel Admin*). 3. Scroll down to the *Odoo Survival Guide* PDF and attempt to view or download it. An error message appears stating that the file does not exist. ### Cause The `FileModelMixin` does not handle files without an `id`, meaning files that are not attachments fa
Original PR description
Embedded files with direct paths in knowledge article templates cannot be viewed or downloaded. ### Steps to Reproduce 1. Install the `knowledge` module. 2. Open the default knowledge article (e.g., *Welcome Mitchel Admin*). 3. Scroll down to the *Odoo Survival Guide* PDF and attempt to view or download it. An error message appears stating that the file does not exist. ### Cause The `FileModelMixin` does not handle files without an `id`, meaning files that are not attachments fail to resolve properly. opw-4380368 opw-4433248 Related enterprise PR: https://github.com/odoo/enterprise/pull/79209 Forward-Port-Of: odoo/odoo#197878 Forward-Port-Of: odoo/odoo#197539
It is possible to have a lead linked to registration from different events by using the merge method on the leads. Currently once they are merged it becomes impossible to update any field that is synced as syncing expects we will only encounter one event. We just default to the first event for the name. Additionally the test revealed that if the lead doesn't have a description and a partner is added, the update mechanism crashes. task-4531433 Forward-Port-Of: odoo/odoo#196848
Original PR description
It is possible to have a lead linked to registration from different events by using the merge method on the leads. Currently once they are merged it becomes impossible to update any field that is synced as syncing expects we will only encounter one event. We just default to the first event for the name. Additionally the test revealed that if the lead doesn't have a description and a partner is added, the update mechanism crashes. task-4531433 Forward-Port-Of: odoo/odoo#196848
Related to https://github.com/odoo/enterprise/pull/78533 Forward-Port-Of: odoo/odoo#196475 Forward-Port-Of: odoo/odoo#196447
Original PR description
Related to https://github.com/odoo/enterprise/pull/78533 Forward-Port-Of: odoo/odoo#196475 Forward-Port-Of: odoo/odoo#196447
before this commit: Shipping methods are missing default vlaue of shipping functionalities, which leads to some methods getting filtered out incorrectly. After this commit: Default value of the shipping functionalities are fetched and checked to select the correct shipping method based on user filters. opw-4167675 Forward-Port-Of: odoo/enterprise#79518
Original PR description
before this commit: Shipping methods are missing default vlaue of shipping functionalities, which leads to some methods getting filtered out incorrectly. After this commit: Default value of the shipping functionalities are fetched and checked to select the correct shipping method based on user filters. opw-4167675 Forward-Port-Of: odoo/enterprise#79518
When an employee takes a leave, the private car reimbursement amount is reduced by a certain amount. However, when they take multiple leaves, the computation doesn't follow. This commit fixes the issue. task-4353922 Forward-Port-Of: odoo/enterprise#79541 Forward-Port-Of: odoo/enterprise#75552
Original PR description
When an employee takes a leave, the private car reimbursement amount is reduced by a certain amount. However, when they take multiple leaves, the computation doesn't follow. This commit fixes the issue. task-4353922 Forward-Port-Of: odoo/enterprise#79541 Forward-Port-Of: odoo/enterprise#75552
This is a fix for failing test after the change introduced in the corrosponding community [PR] task-4240730 [PR]: https://github.com/odoo/odoo/pull/183129 Forward-Port-Of: odoo/enterprise#74294 Forward-Port-Of: odoo/enterprise#71778
Original PR description
This is a fix for failing test after the change introduced in the corrosponding community [PR] task-4240730 [PR]: https://github.com/odoo/odoo/pull/183129 Forward-Port-Of: odoo/enterprise#74294 Forward-Port-Of: odoo/enterprise#71778
We use a couple manual SELECT queries in marketing_automation. However these do not flush before querying, meaning the result is potentially wrong if there was a change to the queried tables since the last flush. This is not too noticeable under regular use as only non-store computed fields hold statistics. However it does make the method innacurate in some cases. Notably tests need to flush manually. We now flush properly, as should have been done. As is done for the whatsapp ove
Original PR description
We use a couple manual SELECT queries in marketing_automation. However these do not flush before querying, meaning the result is potentially wrong if there was a change to the queried tables since the last flush. This is not too noticeable under regular use as only non-store computed fields hold statistics. However it does make the method innacurate in some cases. Notably tests need to flush manually. We now flush properly, as should have been done. As is done for the whatsapp override from 18.0 onwards. task-4589525 Forward-Port-Of: odoo/enterprise#79673
When toggling columns in any Accounting Report list view, it requires a manual refresh to see the changes. this is caused because this [commit](odoo/enterprise@adc4bb7) removed automatic reactivity, so we need to explicitly recompute the columns after updating optionalActiveFields To resolve this, we override the ListRenderer's `toggleOptionalField` function to explicitly recompute columns before rendering. Steps to reproduce: 0. Activate developer mode 1. Navigate to the 'Accounting Re
Original PR description
When toggling columns in any Accounting Report list view, it requires a manual refresh to see the changes. this is caused because this [commit](odoo/enterprise@adc4bb7) removed automatic reactivity, so we need to explicitly recompute the columns after updating optionalActiveFields To resolve this, we override the ListRenderer's `toggleOptionalField` function to explicitly recompute columns before rendering. Steps to reproduce: 0. Activate developer mode 1. Navigate to the 'Accounting Reports' menu in accounting. 2. Open a report (e.g. the balance sheet) 3. Use the column selector to add or remove additional columns OPW-4352833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#79592
An issue may occur where moves are unbalanced when FEC file lines contain a device with an imprecise rounding factor. Steps to reproduce: - Create or use a currency with rounding = 1. - Add rounding to debit or credit in a FEC file, ensuring the rounded unit amount is not equal; for example, two debit lines at 100.5 and one credit line at 201 (see example in test). - In the Idevise column of the file, use the name of the created device. - Attempt to import the file. An error will occur
Original PR description
An issue may occur where moves are unbalanced when FEC file lines contain a device with an imprecise rounding factor. Steps to reproduce: - Create or use a currency with rounding = 1. - Add rounding to debit or credit in a FEC file, ensuring the rounded unit amount is not equal; for example, two debit lines at 100.5 and one credit line at 201 (see example in test). - In the Idevise column of the file, use the name of the created device. - Attempt to import the file. An error will occur: Moves report incorrect balances: Move with name '<name>' has a balance of 1.00. The issue arises because the created device is used to round the amount instead of the company's device, resulting in 100.5 being rounded to 100, hence the two line of 100 no longer balances with 201. opw-4397836 Forward-Port-Of: odoo/enterprise#79698 Forward-Port-Of: odoo/enterprise#76932
Steps to reproduce the bug: - Create two storable products “P1” and “P2”: - Tracked by Serial Number - Create a quality control point: - Operation: Receipt - Control per: Quantity - Create a receipt: - 10 units of P1 - 10 units of P2 - Mark it as "To Do." - Open the detailed operation of P1: - Assign two SNs: - SN1 - SN2 - Save. - The “Quantity” field of the P1 move is updated to 2. - Mark the move of P1 as "Picked." - Validate the receipt. - The backorde
Original PR description
Steps to reproduce the bug:
- Create two storable products “P1” and “P2”:
- Tracked by Serial Number
- Create a quality control point:
- Operation: Receipt
- Control per: Quantity
- Create a receipt:
- 10 units of P1
- 10 units of P2
- Mark it as "To Do."
- Open the detailed operation of P1:
- Assign two SNs: - SN1 - SN2 - Save.
- The “Quantity” field of the P1 move is updated to 2.
- Mark the move of P1 as "Picked."
- Validate the receipt.
- The backorder wizard is triggered → Validate it.
Problem:
A wizard to process the quality check is triggered, but 12 quality checks (2 for P1 and 10 for P2) are loaded instead of only 2 for P1.
Expected Behavior:
Quality checks should only be triggered for picked moves
opw-4442564
Forward-Port-Of: odoo/enterprise#76478before this PR: - The income account was solely derived from the product's configuration. After this PR: - If the product’s income account is not set, we fall back to the default account defined on the POS journal. This ensures the Sales Account used in GSTR-1 computations is properly set. See: https://github.com/odoo/odoo/pull/149816 Forward-Port-Of: odoo/enterprise#79661
Original PR description
before this PR: - The income account was solely derived from the product's configuration. After this PR: - If the product’s income account is not set, we fall back to the default account defined on the POS journal. This ensures the Sales Account used in GSTR-1 computations is properly set. See: https://github.com/odoo/odoo/pull/149816 Forward-Port-Of: odoo/enterprise#79661
Before this commit: The version set on an IoT box server side would never update as it was set only on creation. Also took the opportunity to refactor a bit this old part of the code to make it clearer and add some relevant logs to more easily investigate cases where it could be relevant After this commit: IoT version will now appear with the real value on the IoT app & beautiful relevant logs  *before this PR, the IoT would be stuck with the wrong version (here 18.0)*  *after this PR*  *logs example* opw-4502002 Forward-Port-Of: odoo/enterprise#79603
Currently a `ParseError` is arising when the user installs the `industry_fsm_sale_report` module after deleting `Field Service` product from the products. Steps to reproduce: --- - Install the `industry_fsm_sale` module - Delete `Field Service` from products - Now install `industry_fsm_sale_report` module Traceback: --- ``` Exception: Cannot update missing record 'industry_fsm_sale.field_service_product' ParseError: while parsing /home/odoo/src/enterprise/saas-18.1/industry_fsm_s
Original PR description
Currently a `ParseError` is arising when the user installs the `industry_fsm_sale_report` module after deleting `Field Service` product from the products.
Steps to reproduce:
---
- Install the `industry_fsm_sale` module
- Delete `Field Service` from products
- Now install `industry_fsm_sale_report` module
Traceback:
---
```
Exception: Cannot update missing record 'industry_fsm_sale.field_service_product'
ParseError: while parsing /home/odoo/src/enterprise/saas-18.1/industry_fsm_sale_report/data/product_product_data.xml:4, somewhere inside <record id="industry_fsm_sale.field_service_product" model="product.product">
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
</record>
```
This commit solves the above issue by using `forcecreate="False"` to bypass record creation if it violates checks.
sentry-5731062091
Forward-Port-Of: odoo/enterprise#78988The related community commit ensures that knowledge article templates correctly handle embedded static files. This commit adds a test for that behavior. opw-4380368 opw-4433248 Related Community PR: https://github.com/odoo/odoo/pull/197539 Forward-Port-Of: odoo/enterprise#79435 Forward-Port-Of: odoo/enterprise#79209
Original PR description
The related community commit ensures that knowledge article templates correctly handle embedded static files. This commit adds a test for that behavior. opw-4380368 opw-4433248 Related Community PR: https://github.com/odoo/odoo/pull/197539 Forward-Port-Of: odoo/enterprise#79435 Forward-Port-Of: odoo/enterprise#79209
Forward-Port-Of: odoo/enterprise#79561
Original PR description
Forward-Port-Of: odoo/enterprise#79561
Related to https://github.com/odoo/odoo/pull/196447 Forward-Port-Of: odoo/enterprise#78542 Forward-Port-Of: odoo/enterprise#78533
Original PR description
Related to https://github.com/odoo/odoo/pull/196447 Forward-Port-Of: odoo/enterprise#78542 Forward-Port-Of: odoo/enterprise#78533
During the execution of the validation cron of the OCR, the IAP account selected could sometimes be incorrect. In the context of the validation cron, we need to know to which company the document belong in order to get the correct IAP account (i.e. the one from the company, if it exists). If we use the generic IAP account (i.e. the one that isn't linked to any company), the mismatch of accounts will cause the validation to be ignored by the OCR server. Related ticket [#4522628](https://
Original PR description
During the execution of the validation cron of the OCR, the IAP account selected could sometimes be incorrect. In the context of the validation cron, we need to know to which company the document belong in order to get the correct IAP account (i.e. the one from the company, if it exists). If we use the generic IAP account (i.e. the one that isn't linked to any company), the mismatch of accounts will cause the validation to be ignored by the OCR server. Related ticket [#4522628](https://www.odoo.com/odoo/project.task/4522628) Forward-Port-Of: odoo/enterprise#79550 Forward-Port-Of: odoo/enterprise#79525