Wednesday, January 17, 2024
25 changes · master
Enhancements to existing features
Rental-related error messages on the website have been updated to use a more consistent visual style. This improves clarity for customers when they encounter invalid rental dates or options during the online shopping process.
Original PR description
Prior to this commit, invalid messages were not consistent. This commit adapts the style of these messages to achieve a consistent visual result. Requires: - https://github.com/odoo/enterprise/pull/50364 task-3586525
Several enterprise apps were updated to stay compatible with recent changes in Odoo's shared app framework. This keeps screens such as invoicing, Knowledge, point of sale displays, Sign, and the home menu working consistently after the platform update.
Original PR description
We adapt the enterprise code to the changes brought by https://github.com/odoo/odoo/pull/149217.
Code cleanup and technical improvements
This change streamlines how several Odoo apps request data by routing them through a shared entry point. It supports more efficient batching of requests and updates related tests to validate the new request details.
Original PR description
* = account_accountant, test_discuss_full_enterprise, voip, web_studio The goal is to centralize the entry for all data, allowing to batch all requests together. Tests are adapted to check for params, as the route name itself becomes insufficient. Part of task-3605717 https://github.com/odoo/odoo/pull/149712
Miscellaneous changes
Avoid annoying the user when he put an account manually then changes the label because the account changes again. In order to do that, we only apply the predicted account if it is better than the second option for prediction. To reproduce: * create an invoice * add a line * change the account * change the label of the line Previously, it would always change and override the account even if it had a low certainty about the prediction. Now, it will only override the current account if
Original PR description
Avoid annoying the user when he put an account manually then changes the label because the account changes again. In order to do that, we only apply the predicted account if it is better than the second option for prediction. To reproduce: * create an invoice * add a line * change the account * change the label of the line Previously, it would always change and override the account even if it had a low certainty about the prediction. Now, it will only override the current account if there is a prediction that is clearly better. The threashold is a ranking at least 10% better than the secondbest choice. [task-3525714](https://www.odoo.com/web#id=3525714&model=project.task) Forward-Port-Of: odoo/enterprise#54026 Forward-Port-Of: odoo/enterprise#53776
The update streamlines how several apps access information about the current user by using session data earlier in the loading process. This is an internal cleanup that helps reduce startup dependencies and supports smoother future improvements without changing day-to-day workflows.
Original PR description
* = approvals, voip, website_helpdesk_livechat This will ease the transition to removing await dependency on init_messaging, as the biggest remaining reason was to know the current user. Part of task-3605717 https://github.com/odoo/odoo/pull/149561
This update removes an outdated email-forcing setting from several Odoo views and wizards, aligning Enterprise behavior with the related Community change. Users should see the same workflows continue to work, with cleaner and more consistent handling of email actions behind the scenes.
Original PR description
This commit is a follow up of its community part : https://github.com/odoo/odoo/pull/143311 task - 3538000 https://www.odoo.com/web#id=3538000&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form
### 1. Remove unwanted border Prior to this PR, there was a border on the date picker in the sidebar of the shop page, which created a layout issue. To fix that, this commit removes this border. ### 2. Adapt invalid inputs Prior to this commit, renting inputs were supposed to have a red border when invalid. The related function targeted the wrong name and no longer worked. This commit adapts this function and the style applied to maintain consistency. Requires: - https://github.com
Original PR description
### 1. Remove unwanted border Prior to this PR, there was a border on the date picker in the sidebar of the shop page, which created a layout issue. To fix that, this commit removes this border. ### 2. Adapt invalid inputs Prior to this commit, renting inputs were supposed to have a red border when invalid. The related function targeted the wrong name and no longer worked. This commit adapts this function and the style applied to maintain consistency. Requires: - https://github.com/odoo/enterprise/pull/54378 task-3586525 Forward-Port-Of: odoo/enterprise#50364
Steps: Open the Field Service module. Go to configuration. Open worksheet templates. Select any worksheet template and click on "Design Template". Drag and drop tabs or columns inside the comments field. The size of tabs/columns appears very small. Issue: When dragging and dropping tabs or columns inside the comments field, the size of the tabs/columns appears very small. Cause: This issue occurs because tabs and columns are allowed inside the comments field. Inside the comment
Original PR description
Steps: Open the Field Service module. Go to configuration. Open worksheet templates. Select any worksheet template and click on "Design Template". Drag and drop tabs or columns inside the comments field. The size of tabs/columns appears very small. Issue: When dragging and dropping tabs or columns inside the comments field, the size of the tabs/columns appears very small. Cause: This issue occurs because tabs and columns are allowed inside the comments field. Inside the comments field, there is a grid, which reduces the size of tabs and columns. Fix: It is unnecessary to allow tabs and columns inside the comments field. We should restrict them from being placed inside the comments field. Tabs and columns should be allowed inside sheet and after group. task-3631285 Forward-Port-Of: odoo/enterprise#54361 Forward-Port-Of: odoo/enterprise#49034
Forward-Port-Of: odoo/enterprise#54429 Forward-Port-Of: odoo/enterprise#53791
Original PR description
Forward-Port-Of: odoo/enterprise#54429 Forward-Port-Of: odoo/enterprise#53791
Steps to reproduce ------------------ 1. Install Helpdesk with demo data, go to the portal > Tickets. 2. Group by "Stage", and look at the order of the Stage groups. 3. Sort by "Stage", and the order of the Stage groups is now different. --- The groups should always be in the same order, regardless of the order of the tickets. This PR makes the order of the groups consistent regardless of the order of the tickets. Task-3675085 Forward-Port-Of: odoo/enterprise#53908
Original PR description
Steps to reproduce ------------------ 1. Install Helpdesk with demo data, go to the portal > Tickets. 2. Group by "Stage", and look at the order of the Stage groups. 3. Sort by "Stage", and the order of the Stage groups is now different. --- The groups should always be in the same order, regardless of the order of the tickets. This PR makes the order of the groups consistent regardless of the order of the tickets. Task-3675085 Forward-Port-Of: odoo/enterprise#53908
Added JS tests for the following: - fsm_date_widget - fsm_task_calendar_view - fsm_task_gantt_view (patched TaskGanttController) Also refatored fsm_date_widget planned_date_end deprecated references (to date_deadline) Task-3661094 Forward-Port-Of: odoo/enterprise#53696
Original PR description
Added JS tests for the following: - fsm_date_widget - fsm_task_calendar_view - fsm_task_gantt_view (patched TaskGanttController) Also refatored fsm_date_widget planned_date_end deprecated references (to date_deadline) Task-3661094 Forward-Port-Of: odoo/enterprise#53696
Steps to Reproduce: - install timesheets - go to cofiguration - under time encoding - enable Days/Half-Days option - click on all timesheets, go to kanban view - select a record, click on validate Issue: - in validated timesheet the days spent field is editable, days spent should not be editable in validated timesheet. Cause: - while giving attributes to the unit_amount field, the conditions checking for readonly will cause the error. Solution: - if we gave the conditions prop
Original PR description
Steps to Reproduce: - install timesheets - go to cofiguration - under time encoding - enable Days/Half-Days option - click on all timesheets, go to kanban view - select a record, click on validate Issue: - in validated timesheet the days spent field is editable, days spent should not be editable in validated timesheet. Cause: - while giving attributes to the unit_amount field, the conditions checking for readonly will cause the error. Solution: - if we gave the conditions properly,then the issue will be solved. task-3627670 Forward-Port-Of: odoo/enterprise#54243 Forward-Port-Of: odoo/enterprise#52373
Before this commit: To reproduce the issue (v15 and >): 1. Install PoS and IoT 2. Enable Wordline and configure a worldline payment terminal on the IoT 3. Create 2 payment methods using the same Worldline payment terminal (for instance, if you have a specific meal/eco vouchers bank account) 4. Set them as available payment method of a PoS session 5. Open the PoS session 6. Click the "Last Transaction Status" on the top right => will cause a SEGFAULT on the Worldline driver cr
Original PR description
Before this commit: To reproduce the issue (v15 and >): 1. Install PoS and IoT 2. Enable Wordline and configure a worldline payment terminal on the IoT 3. Create 2 payment methods using the same Worldline payment terminal (for instance, if you have a specific meal/eco vouchers bank account) 4. Set them as available payment method of a PoS session 5. Open the PoS session 6. Click the "Last Transaction Status" on the top right => will cause a SEGFAULT on the Worldline driver crashing Odoo service After this commit: We first filter per IoT IP to perform the action once per IoT box Also added an error message if no worldline terminal is configured opw-3630370 Forward-Port-Of: odoo/enterprise#53511 Forward-Port-Of: odoo/enterprise#52340
How to reproduce: - select multiple documents along with a spreadsheet. - try to open the spreadsheet. - Blank preview screen appears. Technical reason: - The document which we try to open/preview is passed under the `mainDocument` key. Ref: https://github.com/odoo/enterprise/blob/16.0/documents/static/src/views/kanban/documents_kanban_model.js#L27 After this commit: We are able to open the spreadsheet. task-3508537 Forward-Port-Of: odoo/enterprise#54297 Forward-Port-Of: odoo/
Original PR description
How to reproduce: - select multiple documents along with a spreadsheet. - try to open the spreadsheet. - Blank preview screen appears. Technical reason: - The document which we try to open/preview is passed under the `mainDocument` key. Ref: https://github.com/odoo/enterprise/blob/16.0/documents/static/src/views/kanban/documents_kanban_model.js#L27 After this commit: We are able to open the spreadsheet. task-3508537 Forward-Port-Of: odoo/enterprise#54297 Forward-Port-Of: odoo/enterprise#49092
Improved warning message for shiprocket recommended couriers in sales order. task-3658367 Forward-Port-Of: odoo/enterprise#53526
Original PR description
Improved warning message for shiprocket recommended couriers in sales order. task-3658367 Forward-Port-Of: odoo/enterprise#53526
…-alpha.7 Forward-Port-Of: odoo/enterprise#54225
Original PR description
…-alpha.7 Forward-Port-Of: odoo/enterprise#54225
In a previous commit [1], we modified the code to update the currency rates, introducing a bug where we could only get the currency rates from the first provider. This commit fixes that. [1] 24012f9db268a7722275a508374498bb18bbebdc Forward-Port-Of: odoo/enterprise#54055 Forward-Port-Of: odoo/enterprise#54025
Original PR description
In a previous commit [1], we modified the code to update the currency rates, introducing a bug where we could only get the currency rates from the first provider. This commit fixes that. [1] 24012f9db268a7722275a508374498bb18bbebdc Forward-Port-Of: odoo/enterprise#54055 Forward-Port-Of: odoo/enterprise#54025
Before this commit, when a database was upgraded from 15 to 16 with subscription, the sale.order that created the sale.subscription records (O1) could not be updated without triggering the subscription python constraint preventing to have a recurring product and no recurrence. These order when confirmed created the sale.subscription records. During the upgrade, they were linked to the sale.subscription records migrated to sale.order record (O2) with the subscription_id o2m field and their subscr
Original PR description
Before this commit, when a database was upgraded from 15 to 16 with subscription, the sale.order that created the sale.subscription records (O1) could not be updated without triggering the…
Before this commit, when a database was upgraded from 15 to 16 with subscription, the sale.order that created the sale.subscription records (O1) could not be updated without triggering the subscription python constraint preventing to have a recurring product and no recurrence. These order when confirmed created the sale.subscription records. During the upgrade, they were linked to the sale.subscription records migrated to sale.order record (O2) with the subscription_id o2m field and their subscription_management field remained identical (empty or 'create' value). After confirmation if these O1 records where updated to deliver non recurring products for example, it was impossible to update the line and invoice the remaining newly delivered products because they would trigger the python constraint. This commit exclude them based on their values: they have a subscription_id value but no subscription_management value. opw-ticket: 3634253 Forward-Port-Of: odoo/enterprise#54282 Forward-Port-Of: odoo/enterprise#53081
Purpose ======= Improve the appointment general UI. Specifications ============ - Automatically set the calendar event duration to the related appointment type duration when creating a calendar event and there's the appointment_type_id in the context. - Improve the gantt booking form view. - Only allow appointment admins to reorder the appointment type in the list and kanban views. - Improve the resource list and form views. - Move the Share Links menu under Reporting. - Change t
Original PR description
Purpose ======= Improve the appointment general UI. Specifications ============ - Automatically set the calendar event duration to the related appointment type duration when creating a calendar event…
Purpose ======= Improve the appointment general UI. Specifications ============ - Automatically set the calendar event duration to the related appointment type duration when creating a calendar event and there's the appointment_type_id in the context. - Improve the gantt booking form view. - Only allow appointment admins to reorder the appointment type in the list and kanban views. - Improve the resource list and form views. - Move the Share Links menu under Reporting. - Change the calendar template to prevent displaying 'OdooBot' as the sender when recieving a calendar event invitation. - Improve the action helper for the Invitations menu and create an action helper for the appointment type questions answers list view. - Change the location placeholder and the avatars_display description in the appointment type form view. - Align the '+X' with the many2many element names at display. - Removing the 'Appointment' tags from the search tags as events generated through a type can already be found otherwise. - Open the gantt form view instead of the gantt planning view when creating an event by clicking on a gantt cell. - Fix the reserved capacity field display in the gantt form view. - Create an access rule to restrict the internal user access to show the open appointment types or the ones where they are staff users, with only read access. Task-3544915 Forward-Port-Of: odoo/enterprise#54328 Forward-Port-Of: odoo/enterprise#49719
On database with large amount of move lines, the report is really slow to generate, this commit improve a bit the situation by: 1/ replacing the `amount_residuals_by_aml_id` CTE by a `LATERAL JOIN` 2/ Fixing inefficient subquery that exclude move line of an exchange move (`NOT IN` -> `NOT EXISTS`) 3/ rounding the `amount_residual` (aka "Balance in Foreign Currency") so that line where reconciled amount sum is not strictly zero (epsilon) are all correctly excluded On our test database
Original PR description
On database with large amount of move lines, the report is really slow to generate, this commit improve a bit the situation by: 1/ replacing the `amount_residuals_by_aml_id` CTE by a `LATERAL JOIN` 2/ Fixing inefficient subquery that exclude move line of an exchange move (`NOT IN` -> `NOT EXISTS`) 3/ rounding the `amount_residual` (aka "Balance in Foreign Currency") so that line where reconciled amount sum is not strictly zero (epsilon) are all correctly excluded On our test database, the report now render in ~2 minutes, down from ~13-15 minutes before OPW-3646825 Forward-Port-Of: odoo/enterprise#54014
The "Subscriptions" dashboard is wrong. - check the "Top Quotations" and "Top Subscriptions" tables: the both show the same records (wrong domain). - the amounts in the two tables mentionned above are displayed and ordered (!) in the sale order currency. Ordering amounts which are not all in the same currency makes no sense. To fix the issue, those two list now use the model `sale.subscription.report` (instead of `sale.order`) where the amounts are properly normalized to th
Original PR description
The "Subscriptions" dashboard is wrong. - check the "Top Quotations" and "Top Subscriptions" tables: the both show the same records (wrong domain). - the amounts in the two tables mentionned above…
The "Subscriptions" dashboard is wrong. - check the "Top Quotations" and "Top Subscriptions" tables: the both show the same records (wrong domain). - the amounts in the two tables mentionned above are displayed and ordered (!) in the sale order currency. Ordering amounts which are not all in the same currency makes no sense. To fix the issue, those two list now use the model `sale.subscription.report` (instead of `sale.order`) where the amounts are properly normalized to the same currency. This comes with a drawback however: 1 `sale.subscription.report` is roughly equivalent to a `sale.order.line`, which means we don't get the total amount of the SO and we could have twice the same SO in the table if it has 2 recurring lines which are among the top 10. The "See records" action is also les friendly because you end up on the auto-generated form view of `sale.subscription.report` (I'll add a form view, but in another PR, because it requires an upgrade exception) - most domains were wrong. They were including cancelled subscriptions. With all those changes, the dashboards show sensible numbers on next.odoo.com Task: 3680601 Forward-Port-Of: odoo/enterprise#54146
**Version:** - saas-16.3 **Step to reproduce:** - renew a sale order - click on the renewal quote stat button and change the state=sent quotation - the renewal button will disappear from the confirmed sale order form view **Issue:** The renewal quote stat button in the subscription module's sale order form view is only visible when the sale order is in the draft state. **Solution:** The renewal quote stat button will now be displayed even when the sale order is in the sent sta
Original PR description
**Version:** - saas-16.3 **Step to reproduce:** - renew a sale order - click on the renewal quote stat button and change the state=sent quotation - the renewal button will disappear from the confirmed sale order form view **Issue:** The renewal quote stat button in the subscription module's sale order form view is only visible when the sale order is in the draft state. **Solution:** The renewal quote stat button will now be displayed even when the sale order is in the sent state. task-3593973 <hr/> I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr) Forward-Port-Of: odoo/enterprise#52992 Forward-Port-Of: odoo/enterprise#52865
From the 1st of January 2024, commodity code [0803 90 10] is replaced by these 2 new codes: - [0803 90 11] Plátano de Canarias - [0803 90 19] Others Source: https://www.nbb.be/en/statistics/foreign-trade/nomenclature-and-codes  opw-3676899 Forward-Port-Of: odoo/enterprise#54359 Forward-Port-Of: odoo/enterprise#54102
Original PR description
From the 1st of January 2024, commodity code [0803 90 10] is replaced by these 2 new codes: - [0803 90 11] Plátano de Canarias - [0803 90 19] Others Source: https://www.nbb.be/en/statistics/foreign-trade/nomenclature-and-codes  opw-3676899 Forward-Port-Of: odoo/enterprise#54359 Forward-Port-Of: odoo/enterprise#54102
Problem --------- In the commit [24345812cb015e86f362f8c35176646239bfb803](https://github.com/odoo/odoo/commit/24345812cb015e86f362f8c35176646239bfb803) (odoo), we modified the extraction of attachment in such a way that mails coming in a journal from aliases with several attachments create several invoices. Due to the urgency of the task, the computation of whether an attachment needs auto-extraction or not, has been skipped. This commit fixes this. The problem of the failing test came fr
Original PR description
Problem --------- In the commit [24345812cb015e86f362f8c35176646239bfb803](https://github.com/odoo/odoo/commit/24345812cb015e86f362f8c35176646239bfb803) (odoo), we modified the extraction of…
Problem
---------
In the commit [24345812cb015e86f362f8c35176646239bfb803](https://github.com/odoo/odoo/commit/24345812cb015e86f362f8c35176646239bfb803) (odoo), we modified the extraction of attachment in such a way that mails coming in a journal from aliases with several attachments create several invoices.
Due to the urgency of the task, the computation of whether an attachment needs auto-extraction or not, has been skipped. This commit fixes this.
The problem of the failing test came from the conditional order that verified if the auto-extraction was needed or not. Here is the difference
What the test expected
1. From alias
a. Attachment is PDF
2. New move or purchase document
What we had
1. New move
2. From alias
a. Attachment is PDF
3. Purchase document
So, new documents were always extracted even though the option for extracting PDF only was active. Since all document created through a mail from a mail alias are new document, all attachments (no matter if binary or PDF) were extracted.
Solution
---------
Update the `_needs_auto_extract` and decoder to behave as the test expects; by shifting the conditions around. Also context key checks in both the `_needs_auto_extract` method and decoder to completely disable the calls to the OCR when needed.
Forward-Port-Of: odoo/enterprise#49816Descritpion of the issue/feature this commit addresses: At the moment, trying to use the analytic groupy on the Journal Report results in a traceback. It is not possible to use it at all. --- Steps to reproduce: 1-Activate the Analytic Accounting in the settings 2-Activate the Analytic Groupby in the Journal Report's options 3-Go to the Journal Report and apply any Analytic Groupby filter 4-A traceback shows up --- Desired behavior after this commit is merged: This com
Original PR description
Descritpion of the issue/feature this commit addresses: At the moment, trying to use the analytic groupy on the Journal Report results in a traceback. It is not possible to use it at all. --- Steps…
Descritpion of the issue/feature this commit addresses: At the moment, trying to use the analytic groupy on the Journal Report results in a traceback. It is not possible to use it at all. --- Steps to reproduce: 1-Activate the Analytic Accounting in the settings 2-Activate the Analytic Groupby in the Journal Report's options 3-Go to the Journal Report and apply any Analytic Groupby filter 4-A traceback shows up --- Desired behavior after this commit is merged: This commit handles the issue by adding a check at the very start of the custom handler of the Journal Report. This new check verifies that no analytic groupby filter is being applied on the report. If it is the case, an error is raised to tell the user the feature is not supported by that report. While at it, the Horizontal Grouping and Period Comparison options have also been disabled because their rendering was making the report unreadable and they added no value to it. With this commit, the Journal Report can't use Analytic Groupby, Horizontal Grouping or Period Comparison. --- task-3600349 Forward-Port-Of: odoo/enterprise#53807