Saturday, June 21, 2025
36 changes · saas-18.3
Enhancements to existing features
Point of Sale no longer shows old IoT Box setup notifications that are no longer relevant. This reduces confusion for users during device setup and keeps the interface focused on current actions.
Original PR description
We used to display notifications like "We're waiting for your IoT Box to send its devices", that no longer make sense. This commit remove those notifications. Task: 4853242
Blackbox devices can now be recognized correctly by default in IoT setups, without needing an extra Belgian POS blackbox module installed. This avoids them being mistaken for weighing scales, making device setup more reliable for affected businesses.
Original PR description
In order to detect blackboxes as blackboxes instead of adam scales, without installing `pos_blackbox_be` module, we added it to the list of modules from which we download driver. Task: 4787403
Resolved issues and error corrections
The self-service ordering interface can now use the same custom color settings available for kiosk mode. This helps businesses keep customer-facing ordering screens aligned with their brand without extra workarounds.
Original PR description
This modification allows customization of the color of the self-service ordering interface, as is the case for the kiosk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Runbot tests will soon be run in dockers with no access to the outside world, so all their interfaces will be disconnected. The problem is that the browser considers itself offline when no interface is connected. However, in this case, if the Odoo server is still accessible. This method also makes it possible to run local tests when no connection is available and an Odoo server is running locally. A ping is required to verify that the connection to the server is not possible. Forward
Original PR description
Runbot tests will soon be run in dockers with no access to the outside world, so all their interfaces will be disconnected. The problem is that the browser considers itself offline when no interface is connected. However, in this case, if the Odoo server is still accessible. This method also makes it possible to run local tests when no connection is available and an Odoo server is running locally. A ping is required to verify that the connection to the server is not possible. Forward-Port-Of: odoo/odoo#215130
The ToDo app form layout no longer creates unwanted horizontal scrolling on small screens. This improves usability for users working on phones or narrow browser windows by keeping content properly contained.
Original PR description
This commit, avoid changing the padding on the form on small screen and so avoid having horizontal scrolling. Step to reproduce: * Open Odoo on small screen * Open ToDo app * Select or create a record * TRy to scroll horizontally => Bug --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Point of Sale ticket screen now sorts orders more reliably when multiple orders share the same date. This helps staff find and review tickets in the expected order, reducing confusion during checkout or order lookup.
Original PR description
Before: = - Orders were compared using full date objects, which caused incorrect sorting when the dates were the same. After: = - Sorting now uses numeric timestamps for accurate date comparison. - If timestamps are equal, it falls back to sorting by order number. Task: 4881605 Runbot Error: [odoo/error#226754](https://runbot.odoo.com/odoo/error/226754)
The test setup now includes the required accounting journal so Point of Sale configuration tests can run reliably. This prevents false build failures and helps keep the release validation process stable.
Original PR description
The PoS test `test_should_not_affect_other_pos_config` was failing due to a missing required field `account_tax_return_journal_id` when using the res.config.settings form. To resolve this, we now explicitly create a general journal in `collect_company_accounting_data()` and assign it to the company's `account_tax_return_journal_id` during test setup. build_error-226813
This fix makes the IoT payment terminal library download process handle system access changes more safely. It prevents avoidable setup errors when installing or updating the required Worldline payment component, improving reliability for connected payment devices.
Original PR description
The call to the script downloading and extracting `libeasyctep.so` was returning a traceback if it failed to remount the system readonly. We moved the rw/ro mounting logic from the sh script to the python call to avoid this. Task: 4852374
Fixes an issue where adding or changing a cover image on a Knowledge article could fail. Users can now use the Add Cover action as expected, restoring a smoother article editing experience.
Original PR description
There was an issue with Knowledge article cover selection where a user would not be able to change the cover. The issue was introduced with https://github.com/odoo/enterprise/commit/d89f6ddbc4e4402592f31b41db0174dbf3154036 refactoring. This commit restores the proper `arg` format for the `update` function. opw-4845517
Bank reconciliation no longer shows blank action buttons when all reconciliation models have been deleted. This prevents users from clicking a broken button and encountering an error during accounting reconciliation.
Original PR description
Reproduce: 1. Install Accounting 2. Accounting > Bank: Click on some unreconciled statement line There are some buttons like "Internal Transfer" representing reconciliation models. 3. Delete all…
Reproduce:
1. Install Accounting
2. Accounting > Bank: Click on some unreconciled statement line There are some buttons like "Internal Transfer" representing reconciliation models.
3. Delete all reconciliation models.
4. Accounting > Bank: Click on some unreconciled statement line There is a button w/o label. Clicking on it gives an error. (In debug mode the button generation gives an error already) There should be no buttons at all
The issue is that the `get_available_reconcile_model_per_statement_line` can return sth like this in case no reconcilation model was found for statement lines with id 18, 19, 20, 21.
```python
{
18: [{'id': None, 'display_name': None}],
19: [{'id': None, 'display_name': None}],
20: [{'id': None, 'display_name': None}],
21: [{'id': None, 'display_name': None}]
}
```
Since the javascript code assumes that `{'id': None, 'display_name': None}` actually represents a reconciliation model, the error occurs.
After this commit `{'id': None, 'display_name': None}` entries should not appear anymore. In the example an empty dictionary would be returned
task: Nonetask-id: 4746445 IAP PR: https://github.com/odoo/iap-apps/pull/1088 Forward-Port-Of: odoo/odoo#215264 Forward-Port-Of: odoo/odoo#213819
Original PR description
task-id: 4746445 IAP PR: https://github.com/odoo/iap-apps/pull/1088 Forward-Port-Of: odoo/odoo#215264 Forward-Port-Of: odoo/odoo#213819
When creating an expense and then submitting it, it would not save the expense if the expense had duplicates and show a ConfirmationDialog. Now we are saving the potential changes made to the record before the user is submitting it since we dont want his changes to be lost when he confirms the expense. task-4845093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#212931
Original PR description
When creating an expense and then submitting it, it would not save the expense if the expense had duplicates and show a ConfirmationDialog. Now we are saving the potential changes made to the record before the user is submitting it since we dont want his changes to be lost when he confirms the expense. task-4845093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#212931
Backport of https://github.com/odoo/enterprise/pull/86477 which improves what was done in commits - https://github.com/odoo/odoo/commit/ebd6b5f374303dcdfcc69fa64522c1b83bd7fe58 - https://github.com/odoo/enterprise/commit/37cc5e067ff8d1e45edbd9a167a2d801c658739c since it avoids reloading the demo data twice by hooking on `_install_demo`. Instead, we just call our own function to create the demo data once in the accountant module. This commit therefore only reverts ebd6b5f374303dcd
Original PR description
Backport of https://github.com/odoo/enterprise/pull/86477 which improves what was done in commits - https://github.com/odoo/odoo/commit/ebd6b5f374303dcdfcc69fa64522c1b83bd7fe58 - https://github.com/odoo/enterprise/commit/37cc5e067ff8d1e45edbd9a167a2d801c658739c since it avoids reloading the demo data twice by hooking on `_install_demo`. Instead, we just call our own function to create the demo data once in the accountant module. This commit therefore only reverts ebd6b5f374303dcdfcc69fa64522c1b83bd7fe58 Enterprise PR: https://github.com/odoo/enterprise/pull/87204 Forward-Port-Of: odoo/odoo#214883 Forward-Port-Of: odoo/odoo#213379
Since PR #203952, module operations are rejected if any module is in a `to install`, `to upgrade`, or `to remove` state. This has unintentionally exposed a subtle issue where certain imported modules can be left in an inconsistent `to upgrade` state, preventing further module management actions. Steps to Reproduce: 1. Install a imported module, e.g., automobile. 2. Upgrade one of its dependency modules, e.g., purchase_product_matrix. 3. After the upgrade, the imported module is erroneously
Original PR description
Since PR #203952, module operations are rejected if any module is in a `to install`, `to upgrade`, or `to remove` state. This has unintentionally exposed a subtle issue where certain imported modules…
Since PR #203952, module operations are rejected if any module is in a `to install`, `to upgrade`, or `to remove` state. This has unintentionally exposed a subtle issue where certain imported modules can be left in an inconsistent `to upgrade` state, preventing further module management actions.
Steps to Reproduce:
1. Install a imported module, e.g., automobile.
2. Upgrade one of its dependency modules, e.g., purchase_product_matrix.
3. After the upgrade, the imported module is erroneously marked as `to upgrade`
4. The system log for ir.cron then repeatedly shows warnings like: “Skipping database <dbname> because of modules to install/upgrade/remove.”
5. From the Odoo App interface, the user cannot directly install/upgrade/uninstall modules
6. This situation persists until:
(a) The user manually clicks “Cancel Upgrade” for every `to upgrade` imported module, or
(b) The system auto-resets these states after `MAX_FAIL_TIME` (5 hours), reverting them to `installed`.
This fix reverts such modules to `installed` during `button_upgrade`
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#215132In this commit, we fix the tour snippet_popup_and_animations. For trigger: "...olumns .row > :last-child:not(:has(.o_animating))", :not(:has) is always true because no child has class o_animating. When the goal is check that the element has not a class, just use :not Also, when the scroll is well done, the element become invisible. So we need to add :hidden. Forward-Port-Of: odoo/odoo#215183
Original PR description
In this commit, we fix the tour snippet_popup_and_animations. For trigger: "...olumns .row > :last-child:not(:has(.o_animating))", :not(:has) is always true because no child has class o_animating. When the goal is check that the element has not a class, just use :not Also, when the scroll is well done, the element become invisible. So we need to add :hidden. Forward-Port-Of: odoo/odoo#215183
Versions -------- - saas-18.2+ Steps ----- 1. Have a product with optional products and/or variants; 2. add the product to your wishlist; 3. go to wishlist; 4. click on the cart button; 5. close the configurator using the × in the top right corner. Issue ----- The product gets removed from the wishlist, even though it wasn't added to the cart. Cause ----- Before b8d0ab4275b24, the product configurator would never get shown from the wishlist, but with the centralizing of the
Original PR description
Versions -------- - saas-18.2+ Steps ----- 1. Have a product with optional products and/or variants; 2. add the product to your wishlist; 3. go to wishlist; 4. click on the cart button; 5. close the…
Versions -------- - saas-18.2+ Steps ----- 1. Have a product with optional products and/or variants; 2. add the product to your wishlist; 3. go to wishlist; 4. click on the cart button; 5. close the configurator using the × in the top right corner. Issue ----- The product gets removed from the wishlist, even though it wasn't added to the cart. Cause ----- Before b8d0ab4275b24, the product configurator would never get shown from the wishlist, but with the centralizing of the "Add to Cart" logic, it does pop up. The issue is that it shows up after the product has already been removed from the wishlist. Solution -------- Await the result of `addToCart`, which returns the quantity add to the cart, and only call `_removeWish` if it is greater than zero. Also ensure that the product configurator opens with the correct product attributes, and that closing it doesn't automatically redirect you to checkout, unless selected in the configurator. opw-4783677 Forward-Port-Of: odoo/odoo#214369
Before master, this bug is mostly hidden since no WebP files are used by default. However, an upcoming PR targeting master converts all website images to WebP (https://github.com/odoo/odoo/pull/168862), revealing warnings in the server logs due to `binary_to_image` crashing on WebP inputs. This patch avoids the crash by explicitly handling WebP files with `get_webp_size()`. Forward-Port-Of: odoo/odoo#215055 Forward-Port-Of: odoo/odoo#214706
Original PR description
Before master, this bug is mostly hidden since no WebP files are used by default. However, an upcoming PR targeting master converts all website images to WebP (https://github.com/odoo/odoo/pull/168862), revealing warnings in the server logs due to `binary_to_image` crashing on WebP inputs. This patch avoids the crash by explicitly handling WebP files with `get_webp_size()`. Forward-Port-Of: odoo/odoo#215055 Forward-Port-Of: odoo/odoo#214706
A random change of permissions from 755 to 775 of `/home/pi` was blocking ssh connection with key, as well as compromising the safety of the directory. We updated aliases to run commands directly with the right user, to ensure no ownership or permission change occurs. We also updated the `devtools` alias to run `sed` commands as sudo, for it to be able to write its temporary files in the current directory. Forward-Port-Of: odoo/odoo#215159
Original PR description
A random change of permissions from 755 to 775 of `/home/pi` was blocking ssh connection with key, as well as compromising the safety of the directory. We updated aliases to run commands directly with the right user, to ensure no ownership or permission change occurs. We also updated the `devtools` alias to run `sed` commands as sudo, for it to be able to write its temporary files in the current directory. Forward-Port-Of: odoo/odoo#215159
When activating a loyalty program with a buy X get Y promotion. For example for buy 10 get 3, if you have 10 products in your cart and add 1 more product, it will add a reward for 1 free product. But if you add another product, the reward will stay the same, it will not give 2 free product. Steps to reproduce: ------------------- * Create a buy X get Y loyalty program (10 get 3 free) where X and Y are the same product. * Add 10 products to the cart. * Add 1 more product to the ca
Original PR description
When activating a loyalty program with a buy X get Y promotion. For example for buy 10 get 3, if you have 10 products in your cart and add 1 more product, it will add a reward for 1 free product. But if you add another product, the reward will stay the same, it will not give 2 free product. Steps to reproduce: ------------------- * Create a buy X get Y loyalty program (10 get 3 free) where X and Y are the same product. * Add 10 products to the cart. * Add 1 more product to the cart, it will add a reward for 1 free product. * Add another product to the cart > Observation: The reward will not change, it will still be 1 free product. Why the fix: ------------ If possible we will try to maximize the reward quantity. That's why we don't do it in cases where multiple rewards are possible. opw-4762083 Forward-Port-Of: odoo/odoo#214643 Forward-Port-Of: odoo/odoo#211087
Currently a missing dependency error is generated when the user clicks the `Cancel Install` button on an already installed module. This issue may occur due to the below reason: - When the user installs multiple modules at once, the user may click `Cancel Install` on laready installed module - In the duplicate tab scenario, the user module is installed from one tab, and the user clicks `Cancel Install` on another tab. Error : `Some modules are not loaded, some dependencies or mani
Original PR description
Currently a missing dependency error is generated when the user clicks the `Cancel Install` button on an already installed module. This issue may occur due to the below reason: - When the user installs multiple modules at once, the user may click `Cancel Install` on laready installed module - In the duplicate tab scenario, the user module is installed from one tab, and the user clicks `Cancel Install` on another tab. Error : `Some modules are not loaded, some dependencies or manifest may be missing...` This commit will fix the above issue by writing state as 'uninstalled` when the module state is `to install`. Also, the same for `Cancel Uninstall` write the module's state as `installed` when its state is 'to remove' sentry-3928883995 Forward-Port-Of: odoo/odoo#213798
Before this commit, there was not default value for some variables that are being calculated on _get_custom_value_from_order if the field customizable_pdf_form_fields was not updated by the frontend. ## Issue: When creating a quotation with headers or footers set to *"Add by default"* (e.g. via Quotation Templates), and printing the PDF without entering the Quotation Builder tab, the system raises the following error: ```python TypeError: the JSON object must be str, bytes or bytearra
Original PR description
Before this commit, there was not default value for some variables that are being calculated on _get_custom_value_from_order if the field customizable_pdf_form_fields was not updated by the frontend.…
Before this commit, there was not default value for some variables that are being calculated on _get_custom_value_from_order if the field customizable_pdf_form_fields was not updated by the frontend. ## Issue: When creating a quotation with headers or footers set to *"Add by default"* (e.g. via Quotation Templates), and printing the PDF without entering the Quotation Builder tab, the system raises the following error: ```python TypeError: the JSON object must be str, bytes or bytearray, not bool ``` This occurs because `customizable_pdf_form_fields` remains `False` (the default value), and `json.loads(False)` is invalid. Impacted Versions: saas-18.2 and later ## Steps to Reproduce (on runbot): 1. Go to Sales > Configuration > Headers / Footers 2. Select *Project Description* 3. Activate *Add by default* 4. Create a new quotation 5. Select *Office Furniture* as the Quotation Template 6. Directly print *PDF Quote* without opening the *Quotation Builder* tab ## Current Behavior: Raises Error ```python TypeError: the JSON object must be str, bytes or bytearray, not bool ``` ## Expected Behavior: The PDF prints correctly with the default header/footer. Video: Available on task OPW-4840953 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#213267
### Steps to reproduce: - On a contact, add the "Factur-X" E-Invoicing method under the "Accounting" tab - Create an invoice with this contact as the customer - Send the invoice, download the PDF - Verify the PDF. For example with https://demo.verapdf.org/ - `The aforementioned EOL marker shall be immediately followed by a % (25h) character followed by at least four bytes, each of whose encoded byte values shall have a decimal value greater than 127` - `The MIME type of an embedded file, o
Original PR description
### Steps to reproduce: - On a contact, add the "Factur-X" E-Invoicing method under the "Accounting" tab - Create an invoice with this contact as the customer - Send the invoice, download the PDF -…
### Steps to reproduce: - On a contact, add the "Factur-X" E-Invoicing method under the "Accounting" tab - Create an invoice with this contact as the customer - Send the invoice, download the PDF - Verify the PDF. For example with https://demo.verapdf.org/ - `The aforementioned EOL marker shall be immediately followed by a % (25h) character followed by at least four bytes, each of whose encoded byte values shall have a decimal value greater than 127` - `The MIME type of an embedded file, or a subset of a file, shall be specified using the Subtype key of the file specification dictionary. If the MIME type is not known, the "application/octet-stream" shall be used` ### Cause: - 1 Pypdf 2.2 is [adding the necessary binary](https://github.com/py-pdf/pypdf/commit/036789a4664e3f572292bc7dceec10f08b7dbf62) like Odoo [does](https://github.com/odoo/odoo/blob/c1679123c9c6f7184293befb399de1e79a6205a9/odoo/tools/pdf/__init__.py#L471) for Pypdf2.1 because it is mandatory for PDF/A. The issue comes from two line break following each others: Pypdf2.2 adds one at the beginning of the [file](https://github.com/py-pdf/pypdf/blob/036789a4664e3f572292bc7dceec10f08b7dbf62/PyPDF2/pdf.py#L487): `\n % E2 E3 CF D3` Then Odoo [adds the header `%PDF-1.7\n` before](https://github.com/odoo/odoo/blob/c1679123c9c6f7184293befb399de1e79a6205a9/odoo/tools/pdf/__init__.py#L469) resulting in : `b"%PDF-1.7" \n \n % E2 E3 CF D3` PDF/A expects to have `% E2 E3 CF D3` on the second line right after the header but there is nothing on this line. - 2 The Subtype is badly formatted: from `text/xml` to `/text#232Fxml` instead of `/text#2Fxml` This occurs as Odoo [replace `/` by `#2F`](https://github.com/odoo/odoo/blob/2e43bee546d5c14729d654386209b539d8aa71d7/odoo/tools/pdf/__init__.py#L369-L377). But then when [adding the subtype](https://github.com/odoo/odoo/blob/2e43bee546d5c14729d654386209b539d8aa71d7/odoo/tools/pdf/__init__.py#L595C17-L595C74) to the attachment, we call `NameObject` from PyPdf. This object will [format](https://github.com/py-pdf/pypdf/blob/1c4173a12cd21b91dff6d6596ed0bbf1999f2d10/PyPDF2/generic/_base.py#L548) the text again replacing the `#` by `#23`. ### Solution: - Don't add a `\n` after `%PDF-1.7` when using `_pypdf2_2`. - As PyPdf2.2 is doing the formatting itself, we don't format on our side if `submod == ._pypdf2_2`. We still need to add the `/`. opw-4748600 Forward-Port-Of: odoo/odoo#211006
The taxes used in the info popup of the product list should be the taxes of the company that owns the PoS. At the moment, it uses the all the taxes defined on the product regardless of the company. Steps to reproduce: ------------------- * Create a branch for your main company * Define a tax in the main company, and one in the branch * Create a product and assign the two taxes to it * Open the PoS in the branch * Open the product info popup > Observation: Both tax are shown on the popu
Original PR description
The taxes used in the info popup of the product list should be the taxes of the company that owns the PoS. At the moment, it uses the all the taxes defined on the product regardless of the company. Steps to reproduce: ------------------- * Create a branch for your main company * Define a tax in the main company, and one in the branch * Create a product and assign the two taxes to it * Open the PoS in the branch * Open the product info popup > Observation: Both tax are shown on the popup, even the one defined in the main company. Why the fix: ------------ As it is done in `_pos_data_process` we should take the taxes of the company that owns the PoS, and if no tax is found. We should use the taxe of the parent company if there is any. If no tax is found it means no tax should be used. opw-4647704 Forward-Port-Of: odoo/odoo#214669 Forward-Port-Of: odoo/odoo#213797
Previously, when multiple form snippets were added to the same page, corresponding fields (e.g., the "Name" field) in each form were assigned the same ID. This happened because we retrieved the form fields from the `FormEditorRegistry`. For the first form snippet, field IDs are generated and assigned correctly. However, assigning IDs to the fields also updated the fields stored in the `FormEditorRegistry`. So when a second form snippet is added, the fields it receives from the registr
Original PR description
Previously, when multiple form snippets were added to the same page, corresponding fields (e.g., the "Name" field) in each form were assigned the same ID. This happened because we retrieved the form…
Previously, when multiple form snippets were added to the same page, corresponding fields (e.g., the "Name" field) in each form were assigned the same ID. This happened because we retrieved the form fields from the `FormEditorRegistry`. For the first form snippet, field IDs are generated and assigned correctly. However, assigning IDs to the fields also updated the fields stored in the `FormEditorRegistry`. So when a second form snippet is added, the fields it receives from the registry already have an ID. The ID generation logic skips fields that already have an ID, so the fields in subsequent forms never got new IDs. With this fix, we now create a shallow copy of each field before using it. This prevents the original field definitions in the `FormEditorRegistry` from being modified. As a result, fields in different forms now receive unique IDs without needing to explicitly delete the field ID to force a new one to be generated. [task-4251881](https://www.odoo.com/web#id=4251881&cids=1&menu_id=4720&action=333&active_id=1695&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#214954 Forward-Port-Of: odoo/odoo#183883
…nbuild **Problem:** When decreaseing the quantity of the stock move created for the component of the bom when unbuilding, it triggers an error message **Steps to reproduce:** - create a product tracked by quantity (the "component product") - in the category field select an avco category - set an on hand quantity of 1 - create another product tracked by quantity (the "final product") - create a bom for this product and select your first product as the component - create a manufactur
Original PR description
…nbuild **Problem:** When decreaseing the quantity of the stock move created for the component of the bom when unbuilding, it triggers an error message **Steps to reproduce:** - create a product…
…nbuild **Problem:** When decreaseing the quantity of the stock move created for the component of the bom when unbuilding, it triggers an error message **Steps to reproduce:** - create a product tracked by quantity (the "component product") - in the category field select an avco category - set an on hand quantity of 1 - create another product tracked by quantity (the "final product") - create a bom for this product and select your first product as the component - create a manufacture order for the final product - confirm and produce all - unbuild it and click on the "Unbuilds" smart button - select the line of the manufacture order - click on "product moves" - select the line of the component product - set the quantity to 0 **Current behavior:** an error message appears **Expected behavior:** a stock valuation layer should be created with the unit cost of the component product at the time of the manufacture order **Cause of the issue:** price_unit_map is created to make sure that when unbuilding a non standard final product, the outgoing stock valuation layer created for the final product has the same value as in the MO (the current standard_price could have changed due to POs since the MO happened for instance) https://github.com/odoo/odoo/blob/05cff3b7d866f6bc95c4b32f343ae14a4da946f2/addons/mrp_account/models/stock_move.py#L47-L56 when reducing the quantity of the stock move linked to the component of the unbuild an outgoing stock valuation layer is created and _get_out_svl_vals is triggered, those 2 conditions are true https://github.com/odoo/odoo/blob/05cff3b7d866f6bc95c4b32f343ae14a4da946f2/addons/mrp_account/models/stock_move.py#L55-L56 but the product is not the same as the one of move_finished_ids of the MO (this product is final product of the MO) so the filter result in an empty record set and [0] creates an index out of range error https://github.com/odoo/odoo/blob/05cff3b7d866f6bc95c4b32f343ae14a4da946f2/addons/mrp_account/models/stock_move.py#L49-L51 **Fix:** the unit_cost of the stock valuation layer for the component product created from unbuild is the same as : the unit_cost from the stock valuation layer created from the MO for the component (even if the standard_price changed inbetween). https://github.com/odoo/odoo/blob/4fd9ae6ccd96ac13475e7e5aa9805e6f529cd609/addons/stock_account/models/stock_move.py#L516-L517 https://github.com/odoo/odoo/blob/4fd9ae6ccd96ac13475e7e5aa9805e6f529cd609/addons/stock_account/models/stock_move.py#L51 So to be consistent an ajustement to the the stock move created from the unbuild should create a stock valuation layer which also has the same unit cost opw-4747920 Forward-Port-Of: odoo/odoo#211091
Problem: When a paragraph contains a `<br>` element, triple-clicking on any line does not select the entire paragraph — only the clicked line is selected. Solution: Ensure that on triple click, the selection expands to include the entire block, regardless of inline breaks like `<br>`. Steps to reproduce: - Open the Todo app. - Add a paragraph of text. - Use `Shift+Enter` to insert a line break (`<br>`). - Add text on the second line. - Triple-click on the second line. → Only the sec
Original PR description
Problem: When a paragraph contains a `<br>` element, triple-clicking on any line does not select the entire paragraph — only the clicked line is selected. Solution: Ensure that on triple click, the selection expands to include the entire block, regardless of inline breaks like `<br>`. Steps to reproduce: - Open the Todo app. - Add a paragraph of text. - Use `Shift+Enter` to insert a line break (`<br>`). - Add text on the second line. - Triple-click on the second line. → Only the second line is selected, not the full paragraph. opw-4825816 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#214907 Forward-Port-Of: odoo/odoo#212139
When a progress bar is clicked, its aggregates should be refreshed. However, a change introduced in https://github.com/odoo/odoo/pull/163300 inadvertently caused the webclient to request all available aggregates, leading to unnecessarily complex queries (for related field by example). This commit corrects this behavior by ensuring that only the necessary aggregates are requested when a progress bar is selected. Forward-Port-Of: odoo/odoo#215039
Original PR description
When a progress bar is clicked, its aggregates should be refreshed. However, a change introduced in https://github.com/odoo/odoo/pull/163300 inadvertently caused the webclient to request all available aggregates, leading to unnecessarily complex queries (for related field by example). This commit corrects this behavior by ensuring that only the necessary aggregates are requested when a progress bar is selected. Forward-Port-Of: odoo/odoo#215039
Prior to this change, when users cancelled their payment, they remained stuck on their previous order. It was not possible to cancel the order from the basket page. This change allows the user to cancel the order from the shopping cart page. taskId: 4830007 Forward-Port-Of: odoo/odoo#213071 Forward-Port-Of: odoo/odoo#212140
Original PR description
Prior to this change, when users cancelled their payment, they remained stuck on their previous order. It was not possible to cancel the order from the basket page. This change allows the user to cancel the order from the shopping cart page. taskId: 4830007 Forward-Port-Of: odoo/odoo#213071 Forward-Port-Of: odoo/odoo#212140
**Description** - Correction of the entry to calculate Time as per the set duration. **Steps to Reproduce** 1. go to Payroll app -> work entries -> work entries 2. Create new work entry. 3. set the end date at least 24 hours away from the start date. 4. notice that there is a 24 hours extra added/ per everyday you add. --- **Before** the calculation of the work entries duration was incorrect if it exceeds one day. --- **After** the work entry duration is calculated correc
Original PR description
**Description** - Correction of the entry to calculate Time as per the set duration. **Steps to Reproduce** 1. go to Payroll app -> work entries -> work entries 2. Create new work entry. 3. set the end date at least 24 hours away from the start date. 4. notice that there is a 24 hours extra added/ per everyday you add. --- **Before** the calculation of the work entries duration was incorrect if it exceeds one day. --- **After** the work entry duration is calculated correctly and still well rounded. --- **Why the fix** - When the following commit was merged, it introduced duration rounding , but rouding the entire timedelta converted to seconds instead of the number of seconds within a day, while still adding the total days - - commit : https://github.com/odoo/odoo/commit/80ae5f47650077b75dfbe4e813a122c81538cab3 --- opw-4827487 Forward-Port-Of: odoo/odoo#213211
Description of the issue this PR addresses: - The video settings popup has toggle options like autoplay and loop. These need styles from the website module to look like switches. Without that module, they show as checkboxes. Current behavior before PR: - When the website module is not installed, Toggle options look like checkboxes instead of switches. Desired behavior after PR is merged: - Basic switch styles are added directly in the html_editor module. Toggles now look correct e
Original PR description
Description of the issue this PR addresses: - The video settings popup has toggle options like autoplay and loop. These need styles from the website module to look like switches. Without that module, they show as checkboxes. Current behavior before PR: - When the website module is not installed, Toggle options look like checkboxes instead of switches. Desired behavior after PR is merged: - Basic switch styles are added directly in the html_editor module. Toggles now look correct even without the website module. task-4865400 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#214148
The ``test_supplierinfo_without_uom_and_product_template`` test is failing in the single app tests on runbot nightly builds. error: ``` AssertionError: 'product_uom_id' was not found in the view ``` The issue is that the ``product_uom_id`` field is included in the view with the ``uom.group_uom`` group. However, the test case does not assign the ``uom.group_uom`` group to the user. This commit fixes tests failure caused by https://github.com/odoo/odoo/pull/213497 runbot-226816
Original PR description
The ``test_supplierinfo_without_uom_and_product_template`` test is failing in the single app tests on runbot nightly builds. error: ``` AssertionError: 'product_uom_id' was not found in the view ``` The issue is that the ``product_uom_id`` field is included in the view with the ``uom.group_uom`` group. However, the test case does not assign the ``uom.group_uom`` group to the user. This commit fixes tests failure caused by https://github.com/odoo/odoo/pull/213497 runbot-226816 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#215076 Forward-Port-Of: odoo/odoo#214996
**Version:** 16.0 **Steps to reproduce:** - Install industry_fsm_sale - Create two tasks without linking them to a Sale Order - Go to list view and select those tasks - Click "Create Invoice" **Issue:** When the user selects tasks from the list view that are not linked to any Sale Order and tries to create an invoice, a traceback occurs. **Cause:** At least one linked Sale Order record is required when generating an invoice. If the selected tasks are not associated w
Original PR description
**Version:**
16.0
**Steps to reproduce:**
- Install industry_fsm_sale
- Create two tasks without linking them to a Sale Order
- Go to list view and select those tasks
- Click "Create Invoice"
**Issue:**
When the user selects tasks from the list view that are not linked to any Sale Order and tries to create an invoice, a traceback occurs.
**Cause:**
At least one linked Sale Order record is required when generating an invoice. If the selected tasks are not associated with any Sale Order, the process fails.
**Fix:**
This commit raise a red toast notification if none of the selected tasks are linked to a Sale Order. This helps the user understand the issue and prevent traceback..
task-4594178`
Forward-Port-Of: odoo/enterprise#87822
Forward-Port-Of: odoo/enterprise#83661Backport of https://github.com/odoo/enterprise/pull/86477 which improves what was done in commits - https://github.com/odoo/odoo/commit/ebd6b5f374303dcdfcc69fa64522c1b83bd7fe58 - https://github.com/odoo/enterprise/commit/37cc5e067ff8d1e45edbd9a167a2d801c658739c since it avoids reloading the demo data twice by hooking on `_install_demo`. Instead, we just call our own function to create the demo data once in the accountant module Community PR: https://github.com/odoo/odoo/pull/2133
Original PR description
Backport of https://github.com/odoo/enterprise/pull/86477 which improves what was done in commits - https://github.com/odoo/odoo/commit/ebd6b5f374303dcdfcc69fa64522c1b83bd7fe58 - https://github.com/odoo/enterprise/commit/37cc5e067ff8d1e45edbd9a167a2d801c658739c since it avoids reloading the demo data twice by hooking on `_install_demo`. Instead, we just call our own function to create the demo data once in the accountant module Community PR: https://github.com/odoo/odoo/pull/213379 Forward-Port-Of: odoo/enterprise#87993 Forward-Port-Of: odoo/enterprise#87204
**Steps to reproduce:** - Install account_budget - Activate "Budget Management" in Accounting settings - Go to "Accounting / Accounting / Analytic Budget" - Create a new budget: * Budget Type: Expense * Period: [this month] * Budget Lines: [a line with an analytic account (AA) in 2 plans] - Open the budget **Issue 1:** Create a PO at the current date with a line having only one of the AA as analytic distribution and an amount higher than the budgeted amount. The PO line and
Original PR description
**Steps to reproduce:** - Install account_budget - Activate "Budget Management" in Accounting settings - Go to "Accounting / Accounting / Analytic Budget" - Create a new budget: * Budget Type:…
**Steps to reproduce:** - Install account_budget - Activate "Budget Management" in Accounting settings - Go to "Accounting / Accounting / Analytic Budget" - Create a new budget: * Budget Type: Expense * Period: [this month] * Budget Lines: [a line with an analytic account (AA) in 2 plans] - Open the budget **Issue 1:** Create a PO at the current date with a line having only one of the AA as analytic distribution and an amount higher than the budgeted amount. The PO line and the Budget button appear in red, but it shouldn't because the analytic distribution of the line doesn't match all the accounts defined on the budget line. The line will not impact the budget, but it appears in red, which is confusing. **Cause 1:** When computing the budget lines linked to the PO line, the domain that is used is only taking into account the plans that are set on the PO line, ignoring the plans that are not set. For the Budget button, all the PO lines are used instead of just those having the correct analytic distribution. **Issue 2:** - Create a PO at the current date with 2 lines: 1) a line with the same AA than the budget line and an amount higher than the budget amount 2) a line with the same AA than the budget line and an amount lower than the budget amount - Save the PO The first line should be red, but it is not. **Cause 2:** When computing the budget lines linked to the PO lines, only the last PO line has its value set. opw-4757067 Forward-Port-Of: odoo/enterprise#87884
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:** - enable "analytic accounting" setting - Unarchive MTO route - Create a new product - In the inventory page check MTO and Manufacture routes - click on the Bill of materials smart button and create a new BOM - add a component and an operation - Create another product, set "produc
Original PR description
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:**…
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:** - enable "analytic accounting" setting - Unarchive MTO route - Create a new product - In the inventory page check MTO and Manufacture routes - click on the Bill of materials smart button and create a new BOM - add a component and an operation - Create another product, set "product type" as service - in the "create on order" field select "project & task" - create a new quotation with these two products and confirm - click on the "manufacturing" smart button - in the work orders page click on the "open work order" button at the right of the line - click on add a line - set a duration of 30:10 and clik elsewhere on the screen - save - click on the "analytic account" smart button - select the only line and click on the "gross margin" smart button **Current behavior:** There is a single line with an amount of 0.01 **Expected behavior:** The price should reflect the hourly rate of the employee for the task (that's 50.28 with a 100$/hours rate for instance) **Cause of the issue:** There is two issue here. First Issue : When clicking on save on the widget, this will modify the time_ids field of the mrp.workorder this will create a new mrp.workcenter.productivity with the values we wrote. Consequently, on the vals_list when the create method is triggered duration is set to the duration we wrote (so here 30.17) Because of this, when the _compute_duration is the triggered previous_durations will be [30.17] and _create_analytic_entry will be called with a parameter of 30.17 https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L10-L14 Therefore, inside _create_analytic_entry duration will be 0 and amount will also be 0 This issue does not happen if the duration is set by changing the "real duration" in the "work orders" page of the manufacturing order. This is because when doing it this way, we modify the duration of the mrp.workorder which triggers the set_duration_method which also creates a new mrp.workcenter.productivity but here the _prepare_timeline_vals returns a dictonary without a duration field https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workorder.py#L352-L353 Second Issue: The line we see with a 0.01 amount is actually created before we save. It's created from the onchange method when we change the duration on the form. The onchange of duration triggers an onchange of start date which gets the value of duration and triggers of recomputation of duration https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workcenter.py#L522-L531 As a consequence, _compute_duration is called. self.duration is initially not rounded so in our exemple previous duration will be equal to 30.1666666666668 https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L10-L11 However after the call to super()._compute_duration(), self.duration will be rounded thanks to the use of convert to duration inside the super method https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workcenter.py#L472 So when doing the difference here inside _create_analytic_entry https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L38 duration will be 5.555555555556424e-05 and amount will be -0.005555555555556424 which results in the creation of this line with an amount of 0.01 **fix:** Calling the creation of account.analytic.line from the compute method leads to other problems : For instance, if a line is added in the "open work order" widget and we change the end date but change our mind and don't save the line, the duration will have been computed and a new account analytic line will have been created Whereas calling the method _create_analytic_entries from create() and write() ensures it's only called when the model is saved opw-4715690 Forward-Port-Of: odoo/enterprise#85517
This [commit](https://github.com/odoo-dev/enterprise/commit/43088c9c7cd40fe1c8a088e959a0c8b510990061#diff-58e5e345ff4395ccf7e6c13178e3c909cb18204ffcdceaa7352bd67b9d3432c8) changed the group on the Transfers menuitem button as specified by the specs of its tasks but it was later removed from the specs altough kept in the changes. We realized we did not want that change now and this commit addresses that. task-none Forward-Port-Of: odoo/enterprise#88019
Original PR description
This [commit](https://github.com/odoo-dev/enterprise/commit/43088c9c7cd40fe1c8a088e959a0c8b510990061#diff-58e5e345ff4395ccf7e6c13178e3c909cb18204ffcdceaa7352bd67b9d3432c8) changed the group on the Transfers menuitem button as specified by the specs of its tasks but it was later removed from the specs altough kept in the changes. We realized we did not want that change now and this commit addresses that. task-none Forward-Port-Of: odoo/enterprise#88019