Daily updates from Odoo
Friday, April 5, 2024
27 changes · master
Enhancements to existing features
Customer batch payments are easier to find with new search options for reference and amount, and payment statuses are clearer thanks to badge styling. Batch payment reports now use vendor wording where appropriate and include the account holder name, improving clarity for payment review and reconciliation.
Original PR description
+ new search criteria to the customer batch payments(Reference, Amount) + Moved state column to the end on the tree view + Replaced status by badge widgets + Replaced 'customer' by 'vendor' on the batch payment report + Added a 'Account Holder Name' column to the batch payment report task: 3743909
The Knowledge app's automated tests were updated to match a related change that uses YouTube's privacy-enhanced domain for embedded videos. This helps ensure the app continues to validate video behavior correctly while supporting improved privacy practices.
Original PR description
This commit adjusts the tests in response to a community pull request [1], which revises the YouTube video URL to utilize "youtube-nocookie" for enhanced privacy measures. [1]: https://github.com/odoo/odoo/pull/153411 Requires: - https://github.com/odoo/odoo/pull/153411 task-3724858
The Documents module metadata now uses the standard company author name, Odoo S.A. This is a small administrative cleanup that keeps module information consistent with company naming conventions and has no expected impact on users.
Original PR description
### Specification This PR changes the author of documents module from "Odoo" to "Odoo S.A." ### Technical "Odoo S.A." is by default author, so removing author from the manifest file. Task - 3834770
Adds automated checks for the Documents activity view, including the behavior when archiving documents. This helps prevent regressions and keeps document management workflows stable for users.
Original PR description
Purpose ======= Add unit tests for the documents activity view Test the fix of documents archiving in the activity view PR: https://github.com/odoo/odoo/pull/151741 Task: 3704340 Task-3714544
Swiss payroll now better separates family allowance employer costs by renaming the related setup area to “CP Family” and adding a company-rate field for family allowance rates. This helps payroll teams calculate and track company-related family allowance contributions more accurately.
Original PR description
This commit makes adjustments to the handling of Family Allowances in the payroll module including: - Renaming the existing "Work addresses" to "CP Family" - Introducing a new field company rate to Family Allowance Rate. - Adding a new rule to keep the calculations related to the company rate Task-3710171
Resolved issues and error corrections
Helpdesk email templates now use the correct website domain for each helpdesk team when multiple websites are configured. This prevents customers from being sent links with the wrong base address, while still falling back to the main web address when no website domain is set.
Original PR description
Issue: - Addressed an issue where email templates in the helpdesk were acquiring domains from the website instead of the web base URL. Multiple websites with unique helpdesk teams were affected, causing links associated with separate teams to incorrectly revert back to the web base URL. This fix ensures that email template links now correctly refer to the domain entered in the settings > website. In cases where no domain is declared, the links appropriately revert to the web base URL. Solution: - Modified the code to enforce the correct handling of domains and web base URLs for email template links in multiple website scenarios. task-3597611
This update improves how popovers, dropdowns, and other on-screen overlays appear, preventing menus from opening behind other elements. It also corrects visual issues in dark mode and the report editor image cropping tool, making the interface clearer and more consistent for users.
Original PR description
This PR: - Adapts enterprise tests that would fail due to the added wrapping div around overlays. - Fixes properties field style in dark mode - Fixes the style of the report editor image cropping overlay Community: https://github.com/odoo/odoo/pull/153068 Task: [3729376](https://www.odoo.com/mail/view?model=project.task&res_id=3729376)
Miscellaneous changes
…bles In a report (DIN5008 layout for example), have an invalid table -- containing "t" nodes where HTML doesn't expect them, within another invalid table. Before this commit, all the tables were not converted to classic div elements, and other conversions were wrongly applied. After this commit, all tables are converted, leaving other irrelevant nodes untouched. opw-3741137 Forward-Port-Of: odoo/enterprise#60090
Original PR description
…bles In a report (DIN5008 layout for example), have an invalid table -- containing "t" nodes where HTML doesn't expect them, within another invalid table. Before this commit, all the tables were not converted to classic div elements, and other conversions were wrongly applied. After this commit, all tables are converted, leaving other irrelevant nodes untouched. opw-3741137 Forward-Port-Of: odoo/enterprise#60090
Steps to reproduce: ------------------- - in My Timesheet, click on start; - add a project, a task and a description; - click on search icon in the grid (magnifying glass); Issue: ------ The list view never opens. Cause: ------ When the component performs the `onWillStart` hook, we add the timesheet with the current timer and put it into edit mode. This will have the effect of making a new render (destroy the component and create a new one). This will create a new component and re
Original PR description
Steps to reproduce: ------------------- - in My Timesheet, click on start; - add a project, a task and a description; - click on search icon in the grid (magnifying glass); Issue: ------ The list view never opens. Cause: ------ When the component performs the `onWillStart` hook, we add the timesheet with the current timer and put it into edit mode. This will have the effect of making a new render (destroy the component and create a new one). This will create a new component and repeat the process. Solution: --------- Let the component load the timesheet during the `onWillStart` but manage the edit mode during the `onMounted` hook. opw-3788661 Forward-Port-Of: odoo/enterprise#59896
Before this commit, the `helpdesk_ticket_id` field in `account.analytic.line` model was not defined in the list view used in `My Timesheets` menu. This commit updates the list view to correctly display the `helpdesk_ticket_id` field in `My Timesheets` and `All Timesheets`. Forward-Port-Of: odoo/enterprise#59255
Original PR description
Before this commit, the `helpdesk_ticket_id` field in `account.analytic.line` model was not defined in the list view used in `My Timesheets` menu. This commit updates the list view to correctly display the `helpdesk_ticket_id` field in `My Timesheets` and `All Timesheets`. Forward-Port-Of: odoo/enterprise#59255
Added a high z-index to o_invoice_extract_box_layer css class to make the extract box layer on top and clickable again. This was caused by an added z-index to textLayer class in odoo/odoo@5c238950bbf6 Forward-Port-Of: odoo/enterprise#60066
Original PR description
Added a high z-index to o_invoice_extract_box_layer css class to make the extract box layer on top and clickable again. This was caused by an added z-index to textLayer class in odoo/odoo@5c238950bbf6 Forward-Port-Of: odoo/enterprise#60066
Deleting a partner may take a long time because odoo has to check an entire table to find few records or no records at all that reference the partner and set it to null. So we are adding an index btree not null to speed up the deletion of partners. TASK-ID: 3759406 Forward-Port-Of: odoo/enterprise#60047 Forward-Port-Of: odoo/enterprise#59932
Original PR description
Deleting a partner may take a long time because odoo has to check an entire table to find few records or no records at all that reference the partner and set it to null. So we are adding an index btree not null to speed up the deletion of partners. TASK-ID: 3759406 Forward-Port-Of: odoo/enterprise#60047 Forward-Port-Of: odoo/enterprise#59932
Steps to reproduce: ------------------- 1. Assume a user without "Project" access rights (but with "Sale" access rights) 2. Create an SO containing a service product which generates a Project & Task (or Project) on order 3. Confirm the SO 4. An access error should appear: "You are not allowed to modify 'Project' (project.project) records." ------------------- To trigger the same access error but for "Documents" access, repeat the same process but remove the "Documents" access rights of t
Original PR description
Steps to reproduce: ------------------- 1. Assume a user without "Project" access rights (but with "Sale" access rights) 2. Create an SO containing a service product which generates a Project & Task (or Project) on order 3. Confirm the SO 4. An access error should appear: "You are not allowed to modify 'Project' (project.project) records." ------------------- To trigger the same access error but for "Documents" access, repeat the same process but remove the "Documents" access rights of the user. In this case, the service product must have its "Working Template" set. task-3646545 version-16.0 Forward-Port-Of: odoo/enterprise#59794 Forward-Port-Of: odoo/enterprise#58004
If a `studio.approval.rule` refers to a non-existing model (e.g. the model was removed, or renamed, or it's a custom model that is not present during an upgrade), then while attempting to patch the rule's method the registry will [return](https://github.com/odoo/enterprise/blob/961f67d776a8ec1d9293ed599f284807930496d5/web_studio/models/studio_approval.py#L200) a `None` model, which then causes an AttributeError. We add a check for the Model's existence, so that any None models are skipped. Th
Original PR description
If a `studio.approval.rule` refers to a non-existing model (e.g. the model was removed, or renamed, or it's a custom model that is not present during an upgrade), then while attempting to patch the…
If a `studio.approval.rule` refers to a non-existing model (e.g. the model was removed, or renamed, or it's a custom model that is not present during an upgrade), then while attempting to patch the rule's method the registry will [return](https://github.com/odoo/enterprise/blob/961f67d776a8ec1d9293ed599f284807930496d5/web_studio/models/studio_approval.py#L200) a `None` model, which then causes an AttributeError.
We add a check for the Model's existence, so that any None models are skipped. This follows the approach in [base_automation](https://github.com/odoo/odoo/blob/d11ece23e97189f38040254917a3517e21386e47/addons/base_automation/models/base_automation.py#L847-L857), which was the technical inspiration for the [commit](https://github.com/odoo/enterprise/commit/3db107ae481a8da85aa356c729bae5fc246e655b) that implemented the approval rule logic.
Ticket: [3754939](https://www.odoo.com/web#id=3754939&cids=1&menu_id=4720&action=333&active_id=70&model=project.task&view_type=form), [3777251](https://www.odoo.com/web#id=3754939&cids=1&menu_id=4720&action=333&active_id=70&model=project.task&view_type=form)
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/17.0/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-16>", line 2, in new
File "/home/odoo/src/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/17.0/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 606, in load_modules
model._register_hook()
File "/home/odoo/src/enterprise/17.0/web_studio/models/studio_approval.py", line 203, in _register_hook
_patch(Model, approval.method, approval_method)
File "/home/odoo/src/enterprise/17.0/web_studio/models/studio_approval.py", line 132, in _patch
ModelClass = model.env.registry[model._name]
AttributeError: 'NoneType' object has no attribute 'env'
```
Forward-Port-Of: odoo/enterprise#59457
Forward-Port-Of: odoo/enterprise#58688An internal transfer must not be signed in the SAT. Odoo does not allow generating a EDI document in that process, but shows all the MX fields to EDI documents. Now, the fields are not in the view for internal transfers. Forward-Port-Of: odoo/enterprise#42569
Original PR description
An internal transfer must not be signed in the SAT. Odoo does not allow generating a EDI document in that process, but shows all the MX fields to EDI documents. Now, the fields are not in the view for internal transfers. Forward-Port-Of: odoo/enterprise#42569
Before this commit, the test changes the project_id inside a ticket with the id of helpdesk team instead of altering the `team_id` field of that ticket. This commit fixes the issue to correctly change the `team_id` field instead of `project_id` since the id given is the one of a helpdesk team. runbot-61010 Forward-Port-Of: odoo/enterprise#59939
Original PR description
Before this commit, the test changes the project_id inside a ticket with the id of helpdesk team instead of altering the `team_id` field of that ticket. This commit fixes the issue to correctly change the `team_id` field instead of `project_id` since the id given is the one of a helpdesk team. runbot-61010 Forward-Port-Of: odoo/enterprise#59939
[This first commit] fixed an issue with the website menu cache. The menu is not cached anymore if there is a record like URL in the it. When `website_helpdesk` module is installed, since `saas-16.3`, the menu contains a record like URL which disable the menu cache and increase the number of queries. The solution is to increase the max number of queries even if a better solution would be to remove the `Help` link from the menu but we can't do that because `appointment_hr` doesn't depend on `websi
Original PR description
[This first commit] fixed an issue with the website menu cache. The menu is not cached anymore if there is a record like URL in the it. When `website_helpdesk` module is installed, since `saas-16.3`, the menu contains a record like URL which disable the menu cache and increase the number of queries. The solution is to increase the max number of queries even if a better solution would be to remove the `Help` link from the menu but we can't do that because `appointment_hr` doesn't depend on `website`. [This first commit]: https://github.com/odoo/odoo/commit/43576cd424b6d0fc7da01142b5e6550e371ad1ff runbot-60956 runbot-59981 Forward-Port-Of: odoo/enterprise#59905 Forward-Port-Of: odoo/enterprise#59618
Versions -------- - 16.0+ Steps ----- 1. Create a subscription SO; 2. confirm, invoice, and upsell; 3. on upsell, add a non-subscription item; 4. create invoice. Issue ----- On the invoice, the non-subscription item gets labeled with a duration, as if it's supposed to be returned afterwards. Cause ----- When preparing invoice lines, the conditional checks whether the line has a subscription item, or the order is an upsell. The latter part was added in c8b79afe1bf2971a7ac7709e
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Create a subscription SO; 2. confirm, invoice, and upsell; 3. on upsell, add a non-subscription item; 4. create invoice. Issue ----- On the invoice, the non-subscription item gets labeled with a duration, as if it's supposed to be returned afterwards. Cause ----- When preparing invoice lines, the conditional checks whether the line has a subscription item, or the order is an upsell. The latter part was added in c8b79afe1bf2971a7ac7709e7165b863969d6a3d to store subscription id, start_date and end_date on upsell invoice lines. Solution -------- Add an additional conditional to format the description, only displaying duration for items that are subscription-based. opw-3687626 Forward-Port-Of: odoo/enterprise#59865 Forward-Port-Of: odoo/enterprise#58303
This commit fixes a race condition in the following test tour: `test_inventory_adjustment_dont_update_location` Runbuild error: 60324 Forward-Port-Of: odoo/enterprise#59900
Original PR description
This commit fixes a race condition in the following test tour: `test_inventory_adjustment_dont_update_location` Runbuild error: 60324 Forward-Port-Of: odoo/enterprise#59900
In the system parameters, switch account_online_synchronization.proxy_mode to sandbox Add a bank with plaid for example and follow the different steps Have a user [DEMO] with Accounting access set to 'Read-only' Log in with [DEMO] Try to access the Accounting App Dashboard Issue: Access Error """ You are not allowed to access 'Bank Connection' (account.online.link) records. This operation is allowed for the following groups: - Accounting/Accountant - Accounting/Boo
Original PR description
In the system parameters, switch account_online_synchronization.proxy_mode to sandbox
Add a bank with plaid for example and follow the different steps
Have a user [DEMO] with Accounting access set to 'Read-only'
Log in with [DEMO]
Try to access the Accounting App Dashboard
Issue:
Access Error
"""
You are not allowed to access 'Bank Connection' (account.online.link) records.
This operation is allowed for the following groups:
- Accounting/Accountant
- Accounting/Bookkeeper
Contact your administrator to request access if necessary.
"""
This occurs because the read access to the account.online.link
and account.online.account records is granted only to users having at
least the account.group_account_user group
But, as those accesses are defined to be read only, it should be
greanted also to account.group_account_readonly users
opw-3821540
Forward-Port-Of: odoo/enterprise#59984### Steps to reproduce issue: 1. Go to _Field Service > All Tasks > To Invoice_ - If no task is shown, remove To Invoice filter 3. Click on the checkbox of a task 4. The button Create Invoice should appear next to the Print and Actions buttons but it does not ### Explanation: The context key used to show the element contains a `search_default` prefix. Keys with this prefix are specifically used to create a search filter and are deleted in the process. https://github.com/odoo/odoo
Original PR description
### Steps to reproduce issue: 1. Go to _Field Service > All Tasks > To Invoice_ - If no task is shown, remove To Invoice filter 3. Click on the checkbox of a task 4. The button Create Invoice should appear next to the Print and Actions buttons but it does not ### Explanation: The context key used to show the element contains a `search_default` prefix. Keys with this prefix are specifically used to create a search filter and are deleted in the process. https://github.com/odoo/odoo/blob/71c81e605b2f06889ad8031f021863638edab268/addons/web/static/src/search/search_model.js#L291-L300 ### Suggested fix: No existing key in the context is specific to the action nor is their value. Adding a new specific context key prevents unintended behaviours. opw-3773005 Forward-Port-Of: odoo/enterprise#59368
Issue: ------ Some tests of `TestSaleReport` introduced with the fix [^1], do not pass if the module `website_sale` is installed. This is due to the fact that the sale order flush does not flush all the fields of the sale order line model that are used in the tests (`price_subtotal` for example). Solution: --------- Use `flush_all` to flush the `sale.order` and `sale.order.line` models. opw-3818584 [^1]: https://github.com/odoo/enterprise/commit/f886e65ce123f06ee8a5a2f149330864bcdb
Original PR description
Issue: ------ Some tests of `TestSaleReport` introduced with the fix [^1], do not pass if the module `website_sale` is installed. This is due to the fact that the sale order flush does not flush all the fields of the sale order line model that are used in the tests (`price_subtotal` for example). Solution: --------- Use `flush_all` to flush the `sale.order` and `sale.order.line` models. opw-3818584 [^1]: https://github.com/odoo/enterprise/commit/f886e65ce123f06ee8a5a2f149330864bcdb3254 Forward-Port-Of: odoo/enterprise#59915
Before this commit, the lowest shipping rate was used as the delivery cost, as in: https://github.com/odoo/enterprise/blob/8c40ba77b23c4ccd24c3785bc1e6cf5b3fbe0e51/delivery_sendcloud/models/sendcloud_service.py#L91 However, the prices received from the Sendcloud are strings, and as a result, this line returned the rate with the lowest lexicographical order. As a result, sometimes the rates with a higher value were chosen. The issue happens when a shipping product costs a single digit amount (
Original PR description
Before this commit, the lowest shipping rate was used as the delivery cost, as in: https://github.com/odoo/enterprise/blob/8c40ba77b23c4ccd24c3785bc1e6cf5b3fbe0e51/delivery_sendcloud/models/sendcloud_service.py#L91 However, the prices received from the Sendcloud are strings, and as a result, this line returned the rate with the lowest lexicographical order. As a result, sometimes the rates with a higher value were chosen. The issue happens when a shipping product costs a single digit amount (e.g. `9.00`) but a second product costs in double digits (e.g. `11.00`). In this case the latter is used which is wrong. This commit, converts the prices to float before comparing them to get the actual best price. opw-3815117 Forward-Port-Of: odoo/enterprise#59536
The background for the sample data has been removed in the following commit, thus it's not visible in the grid, and the opacity of the record exceeds that of the view. Additionally, the 'o-sample-data-disabled' class is not set in the grid view and also is applied in another view like Kanban. We have set the 'o-sample-data-disabled' class in the grid view in this commit Effect commit: This commit resolves the issue with the background display of sample data in the grid view, ensuring that t
Original PR description
The background for the sample data has been removed in the following commit, thus it's not visible in the grid, and the opacity of the record exceeds that of the view. Additionally, the 'o-sample-data-disabled' class is not set in the grid view and also is applied in another view like Kanban. We have set the 'o-sample-data-disabled' class in the grid view in this commit Effect commit: This commit resolves the issue with the background display of sample data in the grid view, ensuring that the background is now visible and properly. this commit is the refactoring of the content helper and sample data behavior- https://github.com/odoo/odoo/commit/05819e8b4a4ebcb68f085353cd299303619cdbf0 task-3764514 Forward-Port-Of: odoo/enterprise#59956
Since https://github.com/odoo/odoo/pull/127353, the web client only asks for the aggregatable field, making the read_group override of 'account.bank.statement.line' becomes ineffective. Remove the check done on fields, and return the latest running_balance by group when 'show_running_balance_latest' is in the context. Forward-Port-Of: odoo/enterprise#59936
Original PR description
Since https://github.com/odoo/odoo/pull/127353, the web client only asks for the aggregatable field, making the read_group override of 'account.bank.statement.line' becomes ineffective. Remove the check done on fields, and return the latest running_balance by group when 'show_running_balance_latest' is in the context. Forward-Port-Of: odoo/enterprise#59936
It happens that the alerts message returns by UPS doesn't contains a descirption. In that case the dictionary has no key and traceback. Only returns alerts with description Forward-Port-Of: odoo/enterprise#59606
Original PR description
It happens that the alerts message returns by UPS doesn't contains a descirption. In that case the dictionary has no key and traceback. Only returns alerts with description Forward-Port-Of: odoo/enterprise#59606
Currently, the article emoji is too small and appears under the topbar of the Knowledge editor on mobile devices. This commit fixes these two issues and simplifies the CSS to ensure that the emoji is correctly placed on all devices. task-3525618 Forward-Port-Of: odoo/enterprise#59541 Forward-Port-Of: odoo/enterprise#54522
Original PR description
Currently, the article emoji is too small and appears under the topbar of the Knowledge editor on mobile devices. This commit fixes these two issues and simplifies the CSS to ensure that the emoji is correctly placed on all devices. task-3525618 Forward-Port-Of: odoo/enterprise#59541 Forward-Port-Of: odoo/enterprise#54522