Friday, June 21, 2024
24 changes · master
Enhancements to existing features
This update standardizes how interface elements are layered on top of each other by using Bootstrap's built-in options instead of Odoo-specific custom rules. It gives teams more flexibility and helps reduce visual stacking issues in screens such as planning, documents, point of sale displays, timesheets, rooms, grids, and Gantt views.
Original PR description
task-3930430 - requires https://github.com/odoo/odoo/pull/165568 ---------------- This PR removes the custom `z-index` utilities in favor of Bootstrap default allowing us to choose value from a wider range. Prior to this PR, we were using custom utilities to handle the z-index of our elements. This approach allowed us to use `z-index-0` and `z-index-1` classes but it was sometimes not enough, leading to the use of `z-index` CSS properties. With the migration to Bootstrap 5.3 achieved in Commit[1], we now have access to a wider range of `z-index` which are defined inside the `$zindex-levels` map and go from `-1` to `3`. Unfortunately, these new utilities were being overridden by our custom one. To unlock these utilities and allow more flexibility in our code, this PR removes the custom utilities in favor of Bootstrap default. Commit[1]: [6e90b00](https://github.com/odoo/odoo/pull/158560/commits/6e90b0033ed19f2496d0e8816e431cc34dafef6e)
Resolved issues and error corrections
This fix prevents invisible placeholder cards from appearing as white blocks in kanban views. It improves the visual consistency of Documents and Quality Control dashboards without changing business workflows.
Original PR description
This commit aims to fix an issue about the `kanban_ghost` elements within PLM having a visible white background. Commit[1] introduced a simplified version of our kanban archs. Within this commit, a white background is applied on `.o_kanban_record:not(.o_legacy_kanban_record)`, meaning this also applies to `o_kanban_ghost` elements. To avoid this, a `max-height` was set to `O` on `o_kanban_ghost` elements to prevent them from being visible. While this handle most of the scenario, it appears that there is a specific rule within the `quality_control` module that sets a `min-height` to `o_kanban_record`, making them visible due to the white background. To handle this issue, we set the `min-height` property only to other elements that are not `o_kanban_ghost`. Commit[1]: 8995473 task-3996625
Code cleanup and technical improvements
This change cleans up internal website tour testing code by removing helper functions that were either unused or duplicated existing error logging. It does not change customer-facing behavior, but helps keep the test code easier to maintain across affected Odoo apps.
Original PR description
The tourError function was removed because it duplicates console.error() which throws exactly the same kind of error on the runbot. The getDifferentParents function was removed from tour_utils as it is no longer used. The triggerPointerEvent function has been removed from tour_utils as it is no longer used. task~3974087 https://github.com/odoo/odoo/pull/170158
Miscellaneous changes
### Steps to reproduce the issue: 1. Go to _Accounting > Customers > Follow-up Reports_ select one of the reports 2. Click on "Follow up" 3. Open the template in the Content Template field 4. Empty the To (Partners) field in this template 5. Save and close 6. Close the Follow Up and reopen it 5. There is no address in the field ### Explanation: With previous fix, we removed the `default_get` value but did not add a default one in the compute. ### Suggested fix: The default v
Original PR description
### Steps to reproduce the issue: 1. Go to _Accounting > Customers > Follow-up Reports_ select one of the reports 2. Click on "Follow up" 3. Open the template in the Content Template field 4. Empty the To (Partners) field in this template 5. Save and close 6. Close the Follow Up and reopen it 5. There is no address in the field ### Explanation: With previous fix, we removed the `default_get` value but did not add a default one in the compute. ### Suggested fix: The default value will be the same as the one previously in `default_get`. The purpose is to restore the previous workflow and then add the template's values. opw-3878125 Forward-Port-Of: odoo/enterprise#65038 Forward-Port-Of: odoo/enterprise#64902
The Documents app was internally adjusted to keep file delivery compatible with an upcoming platform change. This reduces the risk of disruption when the older attachment streaming method is removed, with no expected change for end users.
Original PR description
refactor the override of _record_to_stream, so it won't be affected when Stream.from_attachment api is removed. odoo/odoo#157249
This change updates internal guided-tour test definitions to use a simpler way of checking whether page elements are present. It reduces maintenance complexity across several business apps without changing how end users use the system.
Original PR description
In order to simplify the towers API, it was decided to remove the extra_trigger key from the steps. To check that an element is in the DOM, simply create a step with a trigger. task~3974087
The spreadsheet test files were moved into a legacy test structure as part of an internal cleanup. This helps keep testing organized while preserving existing spreadsheet behavior for users.
This change updates Web Studio and WhatsApp configuration screens to stop using an older clipboard-copy component. It supports a broader cleanup of the interface code, reducing maintenance while keeping the affected business workflows essentially unchanged.
Original PR description
This commit is the enterprise part of the CopyClipboardText widget removal PR (https://github.com/odoo/odoo/pull/170010) task-3964629
Currently there are errors in `_get_warning_partners`: E.g. `_get_turnover_query` is expected to return 3 values but it only returns 2 now (due to a refactoring; see below). In commit eeaa8d3b31d8efccd42b8705ba387527a39dfb57 some parts of l10n_be_reports were refactored. Some parts were forgotten during a rebase. (The changes were introduced after the refactoring PR was created but before it was merged). This commit finishes the refactoring (and in the process removes the errors). The
Original PR description
Currently there are errors in `_get_warning_partners`: E.g. `_get_turnover_query` is expected to return 3 values but it only returns 2 now (due to a refactoring; see below). In commit eeaa8d3b31d8efccd42b8705ba387527a39dfb57 some parts of l10n_be_reports were refactored. Some parts were forgotten during a rebase. (The changes were introduced after the refactoring PR was created but before it was merged). This commit finishes the refactoring (and in the process removes the errors). The problematic function is currently not called: This is fixed in https://github.com/odoo/enterprise/pull/64313 on 17.2 Error was found during: https://github.com/odoo/enterprise/pull/61962 Forward-Port-Of: odoo/enterprise#64315
To reproduce: - Create an asset linear yearly. - Reevaluate it next month, while decreasing the residual amount. => The amounts don't make sense, the decrease move has been deleted. Idem for the move before the reeval. The issue is that we delete all the moves that are draft. But if a move (like the decrease move) is created after the current day, it is in auto-post, and so, in draft. To correct that, we prevent their deletion and give the correct residual amount (it is a
Original PR description
To reproduce: - Create an asset linear yearly. - Reevaluate it next month, while decreasing the residual amount. => The amounts don't make sense, the decrease move has been deleted. Idem for the move…
To reproduce:
- Create an asset linear yearly.
- Reevaluate it next month, while decreasing the residual amount.
=> The amounts don't make sense, the decrease move has been deleted.
Idem for the move before the reeval.
The issue is that we delete all the moves that are draft.
But if a move (like the decrease move) is created after the current day,
it is in auto-post, and so, in draft.
To correct that, we prevent their deletion and give the correct residual amount
(it is a computed non-stored field, so it has been given as an argument to the method).Another issue was found, related to already depreciated assets.
Create an asset with 10000 as original value, 4000 as Import amount
and 6000 as salvage value.
Confirm it (no moves should be created)
Sell or dispose it.
=> It creates a move before disposal while there shouldn't be any
The issue was that reevaluation didn't work with already depreciated assets and with no moves before the reevaluation.
opw-3945341
task-3444716
Forward-Port-Of: odoo/enterprise#65143
Forward-Port-Of: odoo/enterprise#62982Resolve issue when having a positive equity capital in the chosen report year and having a negative equity capital in the latest comparison period. Info: @wt-io-it Forward-Port-Of: odoo/enterprise#64748
Original PR description
Resolve issue when having a positive equity capital in the chosen report year and having a negative equity capital in the latest comparison period. Info: @wt-io-it Forward-Port-Of: odoo/enterprise#64748
This commit fixes an issue where the retweeted message would only display a part of the retweeted message while twitter displays it in full. This is a limitation of the Twitter API which only sends a limited part of the tweet. To fix this, we are setting the message value to the text of the referenced tweet. task-3653108 Forward-Port-Of: odoo/enterprise#59579 Forward-Port-Of: odoo/enterprise#55642
Original PR description
This commit fixes an issue where the retweeted message would only display a part of the retweeted message while twitter displays it in full. This is a limitation of the Twitter API which only sends a limited part of the tweet. To fix this, we are setting the message value to the text of the referenced tweet. task-3653108 Forward-Port-Of: odoo/enterprise#59579 Forward-Port-Of: odoo/enterprise#55642
Prevent crashes when using the pos app by blocking the user during configuration. We raise an error if the user selected `an IoT-connected screen` ('proxy') for the `customer_display_type` but he didn't specify the display device. Related: https://github.com/odoo/odoo/pull/169485 Forward-Port-Of: odoo/enterprise#64803
Original PR description
Prevent crashes when using the pos app by blocking the user during configuration. We raise an error if the user selected `an IoT-connected screen` ('proxy') for the `customer_display_type` but he didn't specify the display device.
Related: https://github.com/odoo/odoo/pull/169485
Forward-Port-Of: odoo/enterprise#64803Versions -------- - 15.0+ Steps ----- 1. Sync with Google Calendar; 2. create a recurrent all day event in google calendar; 3. make sure it shows as "busy"; 4. make an appointment via website on that day. Issue ----- You are allowed to make an appointment on slots that overlap the synced event. Cause ----- Recurrent day events synced via Google Calendar have their start & end date equal to each other, so the event's "end date" could be 24 hours before the actual end. Commi
Original PR description
Versions -------- - 15.0+ Steps ----- 1. Sync with Google Calendar; 2. create a recurrent all day event in google calendar; 3. make sure it shows as "busy"; 4. make an appointment via website on that…
Versions -------- - 15.0+ Steps ----- 1. Sync with Google Calendar; 2. create a recurrent all day event in google calendar; 3. make sure it shows as "busy"; 4. make an appointment via website on that day. Issue ----- You are allowed to make an appointment on slots that overlap the synced event. Cause ----- Recurrent day events synced via Google Calendar have their start & end date equal to each other, so the event's "end date" could be 24 hours before the actual end. Commit ad4219876cee4f4b996a7cc72fd176b51be3a063 added an the `_slot_availability_prepare_values_meetings` method, optimized to not include conditions on `start_date` and `allday`. Instead, it filters event by date ranges. In our scenario, an `allday` event with start & end dates set to something like `2022-02-14 00:00:00`, may get excluded from the search when this is also the value of the starting point of the search, due to `stop` not being strictly greater than the starting point. Solution -------- Do an inclusive range search instead of an exclusive one. opw-3793009 Forward-Port-Of: odoo/enterprise#65023 Forward-Port-Of: odoo/enterprise#63761
Issue: ====== Sign items are in english in sign Steps to reproduce the issue: ============================= - Create a user with Finnish language (or any other) - Create a sign request and add a date sign item - Send it to the Finnish customer - Open the link - The date doesn't fill automatically and the placeholders are all in english Origin of the issue: ==================== We don't use the language of the partner when fetching the sign items. The date field doesn't fill autom
Original PR description
Issue:
======
Sign items are in english in sign
Steps to reproduce the issue:
=============================
- Create a user with Finnish language (or any other)
- Create a sign request and add a date sign item
- Send it to the Finnish customer
- Open the link
- The date doesn't fill automatically and the placeholders are all in english
Origin of the issue:
====================
We don't use the language of the partner when fetching the sign items. The date field doesn't fill automatically is a consequence of this because we check `type.name === _t("Date")` but we have `type.name` in english and not the lang of the partner so we don't go into the condition to add the automatic fill for the date field here [1].
[1]: https://github.com/odoo/enterprise/blob/15.0/sign/static/src/js/sign_common.js#L1646
opw-3871779
Forward-Port-Of: odoo/enterprise#64950
Forward-Port-Of: odoo/enterprise#61744This PR update the Demo Campaign Double Opt-in's Trigger Value to 0 Hour, so that subscribers of a newsletter get a close-to instant confirmation instead of an hour later. Task-3976448 Forward-Port-Of: odoo/enterprise#64998
Original PR description
This PR update the Demo Campaign Double Opt-in's Trigger Value to 0 Hour, so that subscribers of a newsletter get a close-to instant confirmation instead of an hour later. Task-3976448 Forward-Port-Of: odoo/enterprise#64998
Added support for currency_rate from the world oldest central bank, Sveriges Riksbank. Forward-Port-Of: odoo/enterprise#64344
Original PR description
Added support for currency_rate from the world oldest central bank, Sveriges Riksbank. Forward-Port-Of: odoo/enterprise#64344
Since the introduction of the new model/record, the `record` props of fields can be updated to another `resId` without triggering `onWillUpdateProps`. Instead a new hook called `useRecordObserver` was introduced. This PR introduces multiple technical corrections related to the new model/record. * `openArticle` can use the `Record.save` with `nextId` this will avoid re-loading the current record's data just before switching to another record. * Behaviors in an article body can be destroyed
Original PR description
Since the introduction of the new model/record, the `record` props of fields can be updated to another `resId` without triggering `onWillUpdateProps`. Instead a new hook called `useRecordObserver` was introduced. This PR introduces multiple technical corrections related to the new model/record. * `openArticle` can use the `Record.save` with `nextId` this will avoid re-loading the current record's data just before switching to another record. * Behaviors in an article body can be destroyed sooner using `useRecordObserver`. * Topbar, Sidebar, Comments and Cover are adjusted to properly interact with the `Record` they handle * Ensure that a title is extracted from the body at the right timings if applicable (`beforeLeave` and `openArticle`) * Reduce flickering when switching article task-3875521 Forward-Port-Of: odoo/enterprise#65063 Forward-Port-Of: odoo/enterprise#60960
# How to reproduce - Create product: P1, storable | tracked by lot | barcode set - Create Receipt for 2 units of P1 - In barcode App: - Scan product "P1" - Scan lot "lot1" - Scan lot "lot2" - Select line with "lot1" - Scan dest location "2601892" (Stock/Shelf1 in runbot) => New line created for P1 with quantity 0 https://github.com/odoo/enterprise/assets/29302288/2892a5dc-43e7-4437-9eb7-c079d1b2f807 The selected line is always done first. Usually the selected line
Original PR description
# How to reproduce - Create product: P1, storable | tracked by lot | barcode set - Create Receipt for 2 units of P1 - In barcode App: - Scan product "P1" - Scan lot "lot1" - Scan lot "lot2" - Select…
# How to reproduce
- Create product: P1, storable | tracked by lot | barcode set
- Create Receipt for 2 units of P1
- In barcode App:
- Scan product "P1"
- Scan lot "lot1"
- Scan lot "lot2"
- Select line with "lot1"
- Scan dest location "2601892" (Stock/Shelf1 in runbot)
=> New line created for P1 with quantity 0
https://github.com/odoo/enterprise/assets/29302288/2892a5dc-43e7-4437-9eb7-c079d1b2f807
The selected line is always done first.
Usually the selected line is the last one without reserved quantity, it is not split, and we steal the reserved quantity of the sibling.
However, if the line with incomplete reserved quantity is done first, then it is split. When the next line is done, it steals quantity from the created line, leaving it with reserved_uom_qty = 0 and qty_done = 0.
---
To fix this issue, we assign the reserved quantity from the sibling on all lines before changing the dest location and doing a split.
OPW-3942171
Forward-Port-Of: odoo/enterprise#64592- When clicking on an account that hasn't been mapped, the help message shown in the tree view contained HTML code (tags explicitly shown). - We fix that by directly executing the action returned by the server, which then gets the proper markup and properly interprets the returned HTML code. task: 3715833 Forward-Port-Of: odoo/enterprise#65026 Forward-Port-Of: odoo/enterprise#63376
Original PR description
- When clicking on an account that hasn't been mapped, the help message shown in the tree view contained HTML code (tags explicitly shown). - We fix that by directly executing the action returned by the server, which then gets the proper markup and properly interprets the returned HTML code. task: 3715833 Forward-Port-Of: odoo/enterprise#65026 Forward-Port-Of: odoo/enterprise#63376
… module Steps to reproduces: - install module `test_spreadsheet_edition` - run js tests => some tests fail. The reason is we are trying to click or hover some cells in those tests. But the spreadsheet (its viewport) size is 0. The cells are not visible. This commit moves some scss from module `documents_spreadsheet` to `spreadsheet_edition`. This css ensures the spreadsheet takes all the available space and be sized properly. runbot errors 65775, 65774, 65773, 65772 Forward-P
Original PR description
… module Steps to reproduces: - install module `test_spreadsheet_edition` - run js tests => some tests fail. The reason is we are trying to click or hover some cells in those tests. But the spreadsheet (its viewport) size is 0. The cells are not visible. This commit moves some scss from module `documents_spreadsheet` to `spreadsheet_edition`. This css ensures the spreadsheet takes all the available space and be sized properly. runbot errors 65775, 65774, 65773, 65772 Forward-Port-Of: odoo/enterprise#65015
In applicants kanban view, when there is no applications, the text was unreadable, so it is white now. Task: 3786280 Forward-Port-Of: odoo/enterprise#64967
Original PR description
In applicants kanban view, when there is no applications, the text was unreadable, so it is white now. Task: 3786280 Forward-Port-Of: odoo/enterprise#64967
Task-3610647 Forward-Port-Of: odoo/enterprise#65028 Forward-Port-Of: odoo/enterprise#64267
Original PR description
Task-3610647 Forward-Port-Of: odoo/enterprise#65028 Forward-Port-Of: odoo/enterprise#64267
Previous implementation checked if a folder was empty before removing it. However, it didn't take into account cases where one folder is empty but there are non-empty subfolders inside. Removing the parent folder triggered an error. The new implementation recursively checks the subfolders to ensure their emptiness before trying to remove the parent folder. Forward-Port-Of: odoo/enterprise#62184 Forward-Port-Of: odoo/enterprise#61649
Original PR description
Previous implementation checked if a folder was empty before removing it. However, it didn't take into account cases where one folder is empty but there are non-empty subfolders inside. Removing the parent folder triggered an error. The new implementation recursively checks the subfolders to ensure their emptiness before trying to remove the parent folder. Forward-Port-Of: odoo/enterprise#62184 Forward-Port-Of: odoo/enterprise#61649