Tuesday, July 23, 2024
27 changes
12 changes
Enhancements to existing features
The sales timesheet test suite has been updated from an older testing approach to the newer HOOT framework. This improves long-term maintainability and reliability of internal quality checks without changing customer-facing behavior.
Original PR description
Update legacy tests importing mail/test_utils.js to use HOOT instead of Qunit. Task-3818666
Miscellaneous changes
Update Cla for Openforce --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168681
Original PR description
Update Cla for Openforce --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168681
13 changes
Enhancements to existing features
This change updates an internal test to match expected system behavior after a stored field now performs an additional lookup. It helps keep automated checks accurate without changing user-facing document or accounting workflows.
Original PR description
Test need to be adapted because a new stored field requires to do a search
The adaptation for 3.12 broke some of the 3.11 packages compatibility This commit should fix them. See #173788 for more info Forward-Port-Of: odoo/odoo#173913
Original PR description
The adaptation for 3.12 broke some of the 3.11 packages compatibility This commit should fix them. See #173788 for more info Forward-Port-Of: odoo/odoo#173913
Description of the issue/feature this PR addresses: - In v17.0, the default value of 'analytic plan' (analytic_plan_id) has not been set in setting. - Analytic plan has config_parameter is set as "[analytic.analytic_plan_projects](https://github.com/odoo/odoo/blob/758ced91f8cb220a003a49b01e047b507f8509d7/addons/project/models/res_config_settings.py#L18-L22)" However, the default key was set different "[account.plan_projects](https://github.com/odoo/odoo/blob/758ced91f8cb220a003a49b01e047b507
Original PR description
Description of the issue/feature this PR addresses: - In v17.0, the default value of 'analytic plan' (analytic_plan_id) has not been set in setting. - Analytic plan has config_parameter is set as…
Description of the issue/feature this PR addresses: - In v17.0, the default value of 'analytic plan' (analytic_plan_id) has not been set in setting. - Analytic plan has config_parameter is set as "[analytic.analytic_plan_projects](https://github.com/odoo/odoo/blob/758ced91f8cb220a003a49b01e047b507f8509d7/addons/project/models/res_config_settings.py#L18-L22)" However, the default key was set different "[account.plan_projects](https://github.com/odoo/odoo/blob/758ced91f8cb220a003a49b01e047b507f8509d7/addons/analytic/data/analytic_data.xml#L13)" - And during the migration from v16.0 to v17.0, the default key generated in v16.0 is [removed](https://github.com/odoo/upgrade/blob/20faf7ba48595c61fc028ba1b4cf278d2c44e3cc/migrations/analytic/saas~16.5.1.1/pre-migrate.py#L10-L18) in saas~16.5 and new key will be set which this only "account.plan_projects" . - Because of the incorrect key value of 'analytic plan'(analytic_plan_id) is null. **Steps to reproduce:** - Install project module. - Go to Setting > Projects > got to Analytics section in that Analytic Plan. - Default analytic plan value is not there. **Solution:** - Set the correct key `analytic.project_plan` for the 'analytic_plan_id' field. **Current behavior in 16.0 :**  **Current behavior in 17.0 before pr:**  **Desired behavior after PR is merged:**  task-3941668 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172123
Problem: When attempting to paste text (either via right-click -> paste or using CTRL-V) into the chatter of a shared project, the action fails. This issue was caused by the addition of `event.preventDefault()` in the `ProjectSharingFormController` form. This does not affect the description field as it is also managed by `OdooEditor`. Steps to reproduce: 1. Share a project with a user. 2. Impersonate the user and navigate to the project from the portal. 3. Select a task. 4. Attempt to
Original PR description
Problem: When attempting to paste text (either via right-click -> paste or using CTRL-V) into the chatter of a shared project, the action fails. This issue was caused by the addition of `event.preventDefault()` in the `ProjectSharingFormController` form. This does not affect the description field as it is also managed by `OdooEditor`. Steps to reproduce: 1. Share a project with a user. 2. Impersonate the user and navigate to the project from the portal. 3. Select a task. 4. Attempt to paste something into the chatter. opw-4046529 Forward-Port-Of: odoo/odoo#173329
Steps to reproduce: - Create a kit BOM composed of 40kg of storable product X. - Set cost of X as 10$ - Sell 3 kits in POS - Select customer and create an invoice - in accounting check the the invoice lines - Odoo is calculating the COGS as 3kg instead of 120kg. (30$ instead of 120$) Bug: kit quantities not taken into consideration opw-3962665 Forward-Port-Of: odoo/odoo#171277
Original PR description
Steps to reproduce: - Create a kit BOM composed of 40kg of storable product X. - Set cost of X as 10$ - Sell 3 kits in POS - Select customer and create an invoice - in accounting check the the invoice lines - Odoo is calculating the COGS as 3kg instead of 120kg. (30$ instead of 120$) Bug: kit quantities not taken into consideration opw-3962665 Forward-Port-Of: odoo/odoo#171277
Users without administrative rights were unable to refund transactions because the call to `_send_refund_request` was made without `sudo`. This commit adds both the necessary `sudo` to bypass the access rights check on the transaction's payment acquirer and a manual access rights check on the transaction itself to prevent abusing RPC calls. opw-4033356 Forward-Port-Of: odoo/odoo#173953 Forward-Port-Of: odoo/odoo#173663
Original PR description
Users without administrative rights were unable to refund transactions because the call to `_send_refund_request` was made without `sudo`. This commit adds both the necessary `sudo` to bypass the access rights check on the transaction's payment acquirer and a manual access rights check on the transaction itself to prevent abusing RPC calls. opw-4033356 Forward-Port-Of: odoo/odoo#173953 Forward-Port-Of: odoo/odoo#173663
Currently, if you create a combo product, or modify an existing product into a combo product, the previous tax field is saved. Steps to reproduce: ------------------- * Create a new storable product with a tax set * Modify the product type to `Consumable` * Save > Observation: Next to the price we see "(=... tax incl) Why the fix: ------------ Combo products are not meant to have taxes set. It is confirmed by the fact that the field becomes invisible when we have combo products. Tax
Original PR description
Currently, if you create a combo product, or modify an existing product into a combo product, the previous tax field is saved. Steps to reproduce: ------------------- * Create a new storable product with a tax set * Modify the product type to `Consumable` * Save > Observation: Next to the price we see "(=... tax incl) Why the fix: ------------ Combo products are not meant to have taxes set. It is confirmed by the fact that the field becomes invisible when we have combo products. Taxes are computed once the product is added to the cart depending on the taxes of the products chosen. opw-4004978 Forward-Port-Of: odoo/odoo#172358
EAS codes 0037 and 0215 have been deprecated as of OpenPeppol eDEC codelists v8.9 https://docs.peppol.eu/edelivery/codelists/changelog.html We will place a warning in stable and remove it in master. no task Forward-Port-Of: odoo/odoo#173316
Original PR description
EAS codes 0037 and 0215 have been deprecated as of OpenPeppol eDEC codelists v8.9 https://docs.peppol.eu/edelivery/codelists/changelog.html We will place a warning in stable and remove it in master. no task Forward-Port-Of: odoo/odoo#173316
Steps to reproduce: - Install `l10n_fr_invoice_addr` - Switch to french company - Change "Colors" in "Document Layout" settings - Go to an invoice and click the "Preview" button Because of the inconsistent HTML tags used, the invoice styling wouldn't get applied to the columns added by `l10n_fr_invoice_addr`. This commit improves consistency with the pre-existing HTML hence fixing that issue See: #172497 task-4056046 Forward-Port-Of: odoo/odoo#174071 Forward-Port-Of: odoo/odoo#1732
Original PR description
Steps to reproduce: - Install `l10n_fr_invoice_addr` - Switch to french company - Change "Colors" in "Document Layout" settings - Go to an invoice and click the "Preview" button Because of the inconsistent HTML tags used, the invoice styling wouldn't get applied to the columns added by `l10n_fr_invoice_addr`. This commit improves consistency with the pre-existing HTML hence fixing that issue See: #172497 task-4056046 Forward-Port-Of: odoo/odoo#174071 Forward-Port-Of: odoo/odoo#173299
Steps to reproduce: ------------------- * Activate discount on lines on user parameters * Change the pricelist config to show discount to the customers * Open a PoS session with the modified pricelist * Create an order and apply some discount on the lines * Invoice and pay the order > Observation: On the invoice pdf you should have a line saying "Price discount from X -> X" but it's not there Why the fix: ------------ Before the fix we were comparing the `price_unit` on the line and
Original PR description
Steps to reproduce: ------------------- * Activate discount on lines on user parameters * Change the pricelist config to show discount to the customers * Open a PoS session with the modified pricelist * Create an order and apply some discount on the lines * Invoice and pay the order > Observation: On the invoice pdf you should have a line saying "Price discount from X -> X" but it's not there Why the fix: ------------ Before the fix we were comparing the `price_unit` on the line and the `lst_price` of the product. But if a discount was applied on the line the price unit is not affected, and so the line was never shown. To fix this we compare the `total_price` of the line with the `lst_price` multiplied by the quantity on the line. opw-4019107 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173687 Forward-Port-Of: odoo/odoo#172754
Currently, when website snippets were translated and they had special characters in them, they would be escaped before adding them as the `data-name` attribute of the snippet, which escaped them again. When the snippet would be selected, the sidebar would get that `data-name` attribute and use it as the title, resulting in the characters still being escaped. This commit fixes that by not escaping the name beforehand, but only when used in raw HTML. Example of the problem (Mur d'images): !
Original PR description
Currently, when website snippets were translated and they had special characters in them, they would be escaped before adding them as the `data-name` attribute of the snippet, which escaped them again. When the snippet would be selected, the sidebar would get that `data-name` attribute and use it as the title, resulting in the characters still being escaped. This commit fixes that by not escaping the name beforehand, but only when used in raw HTML. Example of the problem (Mur d'images):  Forward-Port-Of: odoo/odoo#174018 Forward-Port-Of: odoo/odoo#173808
Features or functions removed from Odoo
An unused helper function was removed from the signing template popover component. This is a minor cleanup that reduces code clutter without changing how users create or manage signatures.
Original PR description
Removed a unused function parseInteger in SignItemCustomPopover component task-3975796
Code cleanup and technical improvements
This update restructures how related data is prepared for several communication-related features, including Knowledge, VoIP, and WhatsApp. It supports future improvements while keeping current user-facing behavior largely unchanged.
Original PR description
\* = knowledge, voip, whatsapp And adapted the most simple cases. Part of task-3605717 https://github.com/odoo/odoo/pull/172863
This update prepares Odoo’s guided test tours for a simpler way to identify content inside pop-up windows. It reduces internal complexity and helps keep future maintenance of automated user flows more consistent, with no expected direct impact on end users.
Original PR description
In order to simplify the structure of a tour step, it was decided to remove the "in_modal" key. The purpose of this key is to search for the trigger in a modal element. But actually you just need to add ".modal" to the selector. This functionality therefore really has little added value. That's why we're removing it. In this commit, we prepare the ground to be able to remove this functionality by adding .modal to the selectors and forcing the fact of not looking in a modal (in_modal: false) otherwise that would be duplicative. task~3974087 https://github.com/odoo/odoo/pull/173861
This change updates internal automated tours so visibility checks are handled consistently without a separate allowInvisible setting. It reduces maintenance complexity for test scenarios across accounting, knowledge, payroll, studio, and website studio areas, with no expected direct impact for end users.
Original PR description
In this commit, we remove the allowInvisible key from the structure of a tour step. By default, each trigger in a step must be visible. If we play with a pseudo selector :visible (or :not(:visible)) then tour_compiler does not check if the element is visible (canContinue) in the DOM and the trigger only returns what is targeted. Example: trigger: ".my_element" => Must be visible trigger: ".my_element:visible" => Must be visible. But the tour_compiler doesn't check anything. The verification is done using the pseudo selector trigger: ".my_element:not(:visible)" => Should NOT be visible using the pseudo selector task~3974087 https://github.com/odoo/odoo/pull/172085
The automated tour testing helper now saves field edits more consistently by triggering the expected follow-up events immediately. This reduces confusion for developers maintaining business workflows and makes test scenarios easier to write and keep reliable across multiple Odoo apps.
Original PR description
Before this commit, in rounds, the edit() helper does not directly trigger blur events and changes after modifying the value of a field (input or textarea). This was a desired behavior but which implies that it is then necessary to add another event which then triggers the blur & change events, for example: - && press Enter - && press Tab - && click body - && click .where_you_want However, this causes confusion because it is not what is expected by users of the API. In this commit, to simplify the API, we trigger the blur and change events directly in the edit() helper. task~3922501 https://github.com/odoo/odoo/pull/166466
Miscellaneous changes
When stock is not installed, the override of _fsm_ensure_sale_order in industry_fsm_stock doesn't auto-confirm sale order, so the test `test_qty_to_invoice_from_fsm` failed because the `qty_to_invoice` was set to 0 if the order was not confirmed. With this PR, the order is confirmed in the test flow if stock is not installed. opw-[4061485](https://www.odoo.com/web#id=4061485&view_type=form&model=project.task) Forward-Port-Of: odoo/enterprise#67116
Original PR description
When stock is not installed, the override of _fsm_ensure_sale_order in industry_fsm_stock doesn't auto-confirm sale order, so the test `test_qty_to_invoice_from_fsm` failed because the `qty_to_invoice` was set to 0 if the order was not confirmed. With this PR, the order is confirmed in the test flow if stock is not installed. opw-[4061485](https://www.odoo.com/web#id=4061485&view_type=form&model=project.task) Forward-Port-Of: odoo/enterprise#67116
Steps: - Install l10n_nl_reports - Open GL for the year 2024 - Export XAF -> Period numbers are displayed from 401 to 412, instead of 01 to 12 in the exported file opw-3999985 Forward-Port-Of: odoo/enterprise#67127 Forward-Port-Of: odoo/enterprise#67098
Original PR description
Steps: - Install l10n_nl_reports - Open GL for the year 2024 - Export XAF -> Period numbers are displayed from 401 to 412, instead of 01 to 12 in the exported file opw-3999985 Forward-Port-Of: odoo/enterprise#67127 Forward-Port-Of: odoo/enterprise#67098
## Pull Request HOOT (PRHOOT) - part 20 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10
Original PR description
## Pull Request HOOT (PRHOOT) - part 20 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 20 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Community: https://github.com/odoo/odoo/pull/173332 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#67055 Forward-Port-Of: odoo/enterprise#66895
Moved iot.box view technical information to "Technical Information" tab. Task: 4033301 Forward-Port-Of: odoo/enterprise#66306
Original PR description
Moved iot.box view technical information to "Technical Information" tab. Task: 4033301 Forward-Port-Of: odoo/enterprise#66306
Only a few templates are fetched when the user tries to sync all the templates from the `WhatsApp Business Account` form view. Problem: The API request used to fetch all templates incorporates pagination. In the current scenario, the next URL to the subsequent page is included in the response, but we are not using it. Also, the limit parameter is not utilized in our API request to restrict the number of templates on a single page. Consequently, by default, 25 templates are received on the
Original PR description
Only a few templates are fetched when the user tries to sync all the templates from the `WhatsApp Business Account` form view. Problem: The API request used to fetch all templates incorporates pagination. In the current scenario, the next URL to the subsequent page is included in the response, but we are not using it. Also, the limit parameter is not utilized in our API request to restrict the number of templates on a single page. Consequently, by default, 25 templates are received on the first page. As a result, only templates received on the first page are being created or updated(i.e. 25). Solution: The limit to fetch 200 templates on a single page is added to obtain 200 templates in the first request. However, if there are more than 200 templates, the remaining ones will be fetched from the next page. This process will continue in a loop until all templates are received. Task-3903321 Forward-Port-Of: odoo/enterprise#62460
`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast', 'project_timesheet_forecast_sale'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to issues with the representation of time. Specifically, hours were shown as float values in the graph view. For example, 5 hours and 30 minutes were displayed as 5.50 instead of the more intuitive hh:mm format. Although widgets like "float_time" or "timesheet_uom" were available to format these
Original PR description
`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast', 'project_timesheet_forecast_sale'}` Before this Commit: The Graph view was not adaptable to the use of widgets, leading to…
`* = {'helpdesk', 'hr_payroll', 'planning', 'project_timesheet_forecast',
'project_timesheet_forecast_sale'}`
Before this Commit:
The Graph view was not adaptable to the use of widgets, leading to issues with
the representation of time. Specifically, hours were shown as float values in
the graph view. For example, 5 hours and 30 minutes were displayed as 5.50
instead of the more intuitive hh:mm format. Although widgets like "float_time"
or "timesheet_uom" were available to format these values, they were ineffective
in the Graph view due to the architecture parser's limitations. This caused
confusion for users trying to interpret the time accurately.
After this Commit:
The Graph view is now adaptable to the use of widgets. This means that when a widget is applied to format a field's value, the value will be displayed in the specified format. For example, hours can now be shown in the hh:mm format instead of as a float.
Widget `timesheet_uom` is used at places where the module is related/depended
on `hr_timesheet` otherwise `float_time`.
This improvement also ensures that the formatted values are reflected in the Y-axis (Ticks/Intervals) of the Graph view, enhancing the user's ability to interpret the data accurately.
Community PR: https://github.com/odoo/odoo/pull/164280
Task-3861721
Forward-Port-Of: odoo/enterprise#67064
Forward-Port-Of: odoo/enterprise#66050Steps to reproduce: - Create a shipping method with sendcloud as provider. - In the field 'Default package type' create a package type and set 'Max Weight'(e.g 1kg). - Create a sales order, Add shipping, and select sendcloud. - Add 'Total order weight'(e.g 0.5kg) - Click 'Get rate' Returned rate for shipping is unusually big ammout. Before this commit: For sendcloud shipping if sendcloud_default_package_type_id is set, max_weight is stored in kilograms. When checking if the pack
Original PR description
Steps to reproduce: - Create a shipping method with sendcloud as provider. - In the field 'Default package type' create a package type and set 'Max Weight'(e.g 1kg). - Create a sales order, Add…
Steps to reproduce: - Create a shipping method with sendcloud as provider. - In the field 'Default package type' create a package type and set 'Max Weight'(e.g 1kg). - Create a sales order, Add shipping, and select sendcloud. - Add 'Total order weight'(e.g 0.5kg) - Click 'Get rate' Returned rate for shipping is unusually big ammout. Before this commit: For sendcloud shipping if sendcloud_default_package_type_id is set, max_weight is stored in kilograms. When checking if the package needs to be splitted, the target_weight is not being converted whereas the total_weight is.(check link at the bottom for details) Also in shipping rate request for sendcloud `max_weight` was sent in kilograms with `unit` being 'gram'. After this commit: `max_weight` is converted into grams before adding to the shipping rate request. split shipping code: https://github.com/odoo/enterprise/blob/d3b39fe78bc0ae366d32e80e325e89d2a4bb353c/delivery_sendcloud/models/sendcloud_service.py#L160-L162 opw-4035569 Forward-Port-Of: odoo/enterprise#66594