Commit Graph
17994 Commits
Author SHA1 Message Date
FrancoisGe 2f0e7d5822 [FIX] web: KanbanRenderer is rendered twice
Before this commit, the KanbanRenderer was rendered twice.

Why:
---
The "getGroupsOrRecords" function used in the KanbanRenderer templace
uses the "sort" function on "list.groups". The "sort" function modifies
the array on which it is called, which will generate a rerender because
"list.groups" is reactive.

Solution:
---------
Call the "sort" function on a clone of "list.groups".

closes odoo/odoo#139547

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-24 15:23:31 +00:00
Pierre Pulinckx (pipu) 1d6f2da14a [REF] *: add chartjs assets bundle
In the goal of simplify assets loading, in this commit we create a new
assets bundle for chartJS and its luxon adapter.
With this, we can now use loadBundle instead of load these two libraries
with loadJS.

task-3562357

closes odoo/odoo#139544

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-24 15:23:30 +00:00
Pierre ParidansandAaron Bohy feaa6d64bd [FIX] web: tests: click helper: throw error if target is disabled
This commit is a backport of odoo/odoo@f065276a46

Before chrome 116, programmatic clicks on disabled buttons weren't
actually fired. With chrome 116, they are. As a consequence, some
tests fails on chrome 116 because they click (on purpose) on
disabled button to highlight the fact that nothing happens.

This commit improves the click helper to make it throw an error
when the target is disabled. It also adapts the tests that were
clicking on disabled button, in general to simply assert that the
button is disabled instead.

closes odoo/odoo#139537

X-original-commit: 0e8b50d540c9eee0837282883d603937b94b2fd2
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-10-24 15:23:28 +00:00
Adrien Dieudonne a2016359d0 [REF] web, *: avoid extend on h5 for kanban card title
´extends´ generates a lot of css rules.

So in this commit, we remove it by replacing it by the ´h5´ html tag.

closes odoo/odoo#139484

Related: odoo/enterprise#49408
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-10-24 13:55:30 +00:00
Aaron Bohy da257e9d57 [IMP] web: save a has_group rpc at webclient startup
...when voip addon is installed.

We want to avoid predictable rpcs that are systematically done at
webclient startup. In particular, the voip service needs to know if
the user has group "base.group_user", which produces a rpc when
the service is started.

To avoid this, this commit adds the information in the page
directly. As this information is also useful at other places
(even though it's not at startup), we directly add it to the
groupCache of the user service (and we do the same for the
"base.group_system" group, which we also receive in the page).

closes odoo/odoo#139477

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-24 13:55:26 +00:00
Jorge Pinna Puissant 54ae8f96cc [FIX] web: clickbot test modal menus
Before this commit, the clickbot avoid testing modal menus.

Now, the clickbot open and closed the modal menus.

task-id 3535596

closes odoo/odoo#139389

X-original-commit: 60e16f1e32a0e1448c91826ec06c1e0e8a7bb1fc
Related: odoo/enterprise#49352
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-10-24 13:55:20 +00:00
Aaron Bohy a4069e25b6 [FIX] web: CodeEditor: do not notify value props updates
Before this commit, the CodeEditor component called the `onChange`
props function each time the ace library fired the `change` event.
This in particular happens the value of the editor is set
programmatically by a update of the `value` props. Worse, in that
case, the event is fired twice: once with the empty string, and
one with the new real value. This isn't what we want for the
CodeEditor API. We only want to notify the parent of updates done
by the user in the UI. This commit thus filters out the noisy
`change` events fired by ace.

This fixed an issue with the ResourceEditor of the website: select
a scss or js custom resource, click on Reset: the resource is
marked as dirty, because `onChange` is called when the CodeEditor
is updated with the new value.

closes odoo/odoo#139154

Related: odoo/enterprise#49286
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-10-24 12:38:30 +00:00
Aaron Bohy 87c6dde49d [REF] web,*: SearchDropdownItem becomes CheckboxItem
Before this commit, there was a special kind of dropdown item
defined in the search/ folder, named SearchDropdownItem, which was
basically a DropdownItem but with role "menuitemcheckbox" instead
of "menuitem". It allowed to displayed a check icon in front of
values to indicate that they are selected. It is used especially
in the search menu, to indicated which filters/groupbys/favorites
are active.

This specific item is used in other context that search (e.g. pivot).
A similar usecase has also been introduced in website, in the
ResourceEditor (the wowl version of the AceEditor).

This commit thus moves the component to web/core/dropdown and
renames it into CheckboxItem.

Part-of: odoo/odoo#139154
2023-10-24 12:38:30 +00:00
Aaron Bohy 85372ffa94 [REF] web,*: remove last legacy stuff from several bundles
This commit removes the last low level legacy stuff (e.g. Widget,
mixins...) from the backend bundle, and from the webclient bundles
of mrp_subcontracting and project. They are no longer used in the
backend. There're still necessary for the frontend and for the
web_editor though, so we had to manually add them in the lazy
loaded bundle of the editor. Hopefully, the last widgets and
dialogs will be converted soon, and we'll finally get rid of all
those legacy files.

Part-of: odoo/odoo#139154
2023-10-24 12:38:30 +00:00
Aaron Bohy 5b511e27b8 [REF] web: remove select2 from backend assets
The select2 library is only used in the frontend, now that the last
backend usecase (AceEditor) has been removed. This commit thus
removes the select2 library from the backend assets.

Part-of: odoo/odoo#139154
2023-10-24 12:38:30 +00:00
Aaron Bohy 28d85defa5 [REF] web: remove useWidget compatibility helper
Now that the last Component using that helper have been fully
converted to Owl (AceEditorWrapper -> ResourceEditor), we can
remove it.

Part of task~3439226

Part-of: odoo/odoo#139154
2023-10-24 12:38:29 +00:00
Aaron Bohy fddb78a2af [IMP] web: SelectMenu: add autoSort props
By default, the SelectMenu component alphabetically sorts the
choices. Before this commit, this wasn't avoidable. As there's now
a usecase of SelectMenu where we want to enforce a specific order
on the choices (the website AceEditor), this commit introduces a
props `autoSort`, which is `true` by default, but which allows to
disable the sort.

Part-of: odoo/odoo#139154
2023-10-24 12:38:29 +00:00
Aaron Bohy fff1fa0392 [IMP] web: add initialWidth props to ResizablePanel
This props allows to specify the initial width of the panel, whereas
before the initial width was the minimal width, i.e. the user could
only expand the panel, not shrink it.

Part-of: odoo/odoo#139154
2023-10-24 12:38:29 +00:00
Aaron Bohy 4b79bbff82 [MOV] web: move ResizablePanel component to web
This component has been introduced in web_studio. We have now a
similar usecase in website, for the AceEditor component. We thus
move the component definition to web.

Part-of: odoo/odoo#139154
2023-10-24 12:38:29 +00:00
mano-odoo 88e75fd5cd [FIX] web: taglist hide avatar overlay in readonly
The avatars coming from the TagsList component could not differentiate
if the `Many2ManyTagsAvatarField` was in readonly. Displaying an hover
state style when in list view.

This commit checks if the tag.onDelete is defined to render the span
containing the hover effect.

task-3514404

closes odoo/odoo#139455

X-original-commit: ac1757d96ab9ddda934b9b49ad41d83c9567e5b8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-24 11:10:09 +00:00
mano-odoo 787725e054 [FIX] web: kanban_card border top
In commit `2495bfa7259dcbd482b10c95a55313f86d594fcb` we introduce a fix
to adapt the kanban_card border using the border bottom of the prior
kanban_card as a border top allowing to display the outline effect.

This fix works for o_kanban_grouped but breaks the border in views that
are o_kanban_ungrouped. This commit fixes this by removing the
border-top only in the o_kanban_record that are o_kanban_grouped.

The :not(o_dragged) has been added as well to bring back the border when
the element is dragged.

task-3488451

closes odoo/odoo#139453

X-original-commit: 2be67ee122546273d12710c1c9bc3b7e11533b5d
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-10-24 04:59:10 +00:00
Pierre Paridans 3295c6e4c7 [REF] web: simplify iframe retrieval in position hook
This commit reworks and simplifies the `getIFrame()` method in the
following way : instead of trying to find/guess the targetted element
ancestor's document and then looking in this parent for the iframe
containing the targetted element, it now uses the popperEl as parent for
the iframes who may contain the targetted element.

In practice, the only caveats is that it won't support multiple nested
iframes (which we shouldn't use anyway in our codebase).

Part-of: odoo/odoo#138847
2023-10-23 20:07:30 +00:00
Leonardo Pavan Rocha 9086ef0296 [FIX] web: fix calendar view tests after revamp
This commit fixes breaking calendar view tests after the revamp done in
task-3455051 and task-3389317.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha ec3e3c3379 [IMP] web: save sidebar state in session storage
This commit adds the feature of saving the calendar state in the user’s
session storage. This allows the user to refresh the page and the sidebar will
be hidden/shown depending on what is saved in the session storage.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Elisabeth Dickinson bd60b947e9 [IMP] web,calendar,hr_holidays: mobile improvements
Improve Timeoff's calendar layout on mobile.
Change the "today" button into icon button on mobile.

task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 9ffaaab0d3 [IMP] web: popover service prevent click away to cause a click event
Currently the popover service is closed when you click away from the popover.
However, it’s not expected that the click event that closes the popover,
triggers another click event. This was causing a frustrating issue in calendar
where you would close the popover by clicking on the calendar, and it would
open the “new event” form view. The solution is to prevent default when
closing the popover.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 6e4ba770f6 [IMP] web: show date information in calendar header
This commit adds date information in the calendar header depending on the
scale that is being rendered. E.g. in yearly view, we show the year; in
monthly view, we show the month and year; in weekly view, we show the month,
the year and the week number; in daily view we show the day, the month and the
year.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Elisabeth Dickinson 94033a6386 [IMP] web: improve datetime_picker layout
The `datetime_picker` is smaller to fit into the narrower sidebar
and its header buttons improved.

task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Elisabeth Dickinson c9807a743b [IMP] calendar,hr_homeworking,web: improve popover layout
The attendance dropdown is a switch button and "Needs Action" is no
longer visible on the popover (instead none of the buttons are selected)

The popovers are larger and the icons aligned. Their headers are the
color of their event.

The year view's event links inside the popovers have the same styling
as their event in the calendar.

task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Elisabeth Dickinson 775ff75e40 [IMP] web,hr_holiday: improve calendar filter panel
We replaced the customized checkboxes with the original input element
with `.form-check-input` whilst still using the custom colors for more
consistency accross modules.

Avatars have the .o_avatar class added to them which allows us to resize
them with the CSS variable.
And SCSS has been replaced with utility classes where possible.

This commit has been moved here from
PR https://github.com/odoo/odoo/pull/127532

task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Elisabeth Dickinson f9222c4976 [IMP] calendar,hr_holidays, web: global revamp of the calendar view
What's new:
- The overall style is softer, the borders lighter
- The event's colors are less bright
- In month view: The AllDay events and multiple day events are block
colors while the events with start/end times on a single day have a
colored circle.
- A header hosts the date title and navigation buttons (which were in
the sidebar)
- The sidebar is narrower and collapses

We've fixed the height issues giving us double scrollbars in some views.
The sidebar, when long, was pushing the content beyond the frame giving 
us extra scrollbars. This has been fixed with a CSS grid and 
`overflow-y` on the proper elements.

task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 2f4a83e5ab [IMP] web,hr_homeworking,calendar: overwrite default fc header to allow customization
In some modules at Odoo we want to have custom headers for calendar. Since
fullcalendar accepts a function callback that should render the header, it was
decided to have this method exist in the calendar_common_renderer. So any
other apps that want to add something to the header, can just extend this
method. This commit also changes how homeworking changes the header so that it
complies with this change.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 83cd06fae6 [IMP] web: show past events with reduced opacity
In google calendar, events in the past are shown with a reduced opacity. This
makes it easier to differentiate which events are past or not. This commit
implements the same feature.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha d87d5fe51f [IMP] {google_,microsoft_}calendar: only show sync buttons if sync credentials are set
Before this commit, the sync buttons for google and microsoft would appear in
the calendar sidebar even if the sync was not set (module not installed and
credentials not set). After this commit the buttons only appear in the sidebar
if the credentials for that service are set.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 7dd6e5d1a5 [IMP] calendar: revamp views
This commit changes how the calendar module calendar views look, as well as the
 quick create form view for adding a new event.

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
Leonardo Pavan Rocha 2afce22326 [IMP] web: start saving the calendar scale during sessions
This commit adds the feature of saving the calendar scale in the user’s session
storage. This allows the user to refresh the page and land in the same scale as
he had before. Also, if you switch apps, the calendar views will use the scale
saved in the session storage (unless a default scale is set using the mode
attribute).

task-3455051
task-3389317

Part-of: odoo/odoo#138670
2023-10-23 20:07:23 +00:00
dhrs-odoo 11c843b3d9 [FIX] web: fix user name overflowing
In this commit we have fixed that when we give long user name then in task list
view it was overflowing so we have added mw-100 in span and text-truncate in the
div element.

task-3248965

closes odoo/odoo#139180

X-original-commit: b10053bdfbc95e2f587b451c2b4337a96a3ddb27
Related: odoo/enterprise#49193
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-23 17:48:54 +00:00
Mathieu Duckerts-Antoine 0ff4fa07cf [REF] web: use pseudo constructors to create (condition) trees
We define some helpers to easily create condition trees and use them
where it is possible.

closes odoo/odoo#139377

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-23 13:11:23 +00:00
Mathieu Duckerts-Antoine bbf80b16c3 [REM] web: remove some unused search helpers
With a lot of legacy code removed and the introduction of the
SearchBarMenu component (https://github.com/odoo/odoo/pull/116641), some
search helpers have become unused. We remove them.

Part-of: odoo/odoo#139377
2023-10-23 13:11:23 +00:00
nda 25e4fcdd1d [FIX] web: disable export button during data export
steps to reproduce:
in a tree view export a large amount of data (or add a sleep in
/web/export/xlsx)

before this commit:
button is not disabled, allowing users to spam the button

after this commit:
button is disabled, informing the user that we're processing
his request

closes odoo/odoo#139392

X-original-commit: 56853574e10e8cf7d1dcec450db79d96d790f231
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-10-20 23:37:51 +00:00
Sébastien Theys c955327c50 [FIX] account_edi, web, mail: add attachment delete in public tour
This allows better coverage of the feature and in particular its access
check.

Follow-up of https://github.com/odoo/odoo/pull/118701

closes odoo/odoo#139359

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-20 23:37:46 +00:00
Hubert Van de Walle (huvw) a026a9e9b1 [FIX] web: missing pivot measures when using favorites
Steps to reproduce
==================

- Go to budget analysis
- Switch to the pivot view
- Unselect the first three measures
- Save the current search and set it as default
- In the measures dropdown, there is only two measures remaining

Cause of the issue
==================

- When `context.pivot_measures` is used, the measures are computed from
  it and those that comes from the metaData are missing.

opw-3544823

closes odoo/odoo#139315

X-original-commit: b11266cc377fa4753a0ee609258d9919f1ba5496
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-10-20 18:06:41 +00:00
Jorge Pinna Puissant 7adde63d69 [MOV] web,*: move record.js to model folder
This commit is part of a serie of commits which aims at simplifying and
reorganizing js files in the web addon

closes odoo/odoo#139156

Task-id: 3508223
Related: odoo/enterprise#49212
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-20 11:22:17 +00:00
Jorge Pinna Puissant ed3b4c5ab5 [FIX] web: clickbot set all filters
Since the new milk theme, the clickbot for click everywhere, didn't set
the filters on the views.

Now, the clickbot set all the filters on the views. This commit also add
a test suit, to avoid future downgrades. This commit transform the
clickbot to a module ES6.

task-id 3535596

X-original-commit: e2f531ec47e4f946cc37afee6b65531a637b5dfe
Part-of: odoo/odoo#139032
2023-10-20 11:22:13 +00:00
71c81e605b [IMP] *: expression edition
The PR https://github.com/odoo/odoo/pull/104741 have recently modify how the modifiers required, readonly,
invisible, and column_invisible are defined. They are now given by Python
expressions instead of domains. In this PR we introduce two main new
components ExpressionEditor and ExpressionEditorDialog that allow to
edit/view a Python expression in a way similar to what is done in the
DomainSelector/DomainSelectorDialog. For this we have extracted the main
logic found in DomainSelector and moved it to a new component TreeEditor
that is used by both ExpressionEditor and DomainSelector. For this we had
to add a new type of leaf we call "complex condition" that allows us to
represent indecomposable (sub)expressions, i.e. expressions we cannot
(or don't want) to express as conditions of the form (path, operator, value).

The main mappings allowing to transform trees, domains, expressions into
one another (when possible) are to be found in
@web/core/tree_editor/condition_tree.js.

closes odoo/odoo#136258

Related: odoo/enterprise#48512
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
2023-10-20 11:22:05 +00:00
Adrien Schoffeniels 75868ae30e [IMP] web: rename "view_in_kanban" key in properties definition
Purpose:
--------
The "KanbanPropertiesField" has been renamed to "CardPropertiesField".
For consistency, the key "view_in_kanban" of the properties definition
is renamed to "view_in_cards"

Task-3458627

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Adrien Schoffeniels c2ad855b26 [IMP] web: change kanban properties field to card properties field
Purpose:
--------
This commit rewords the "KanbanPropertiesField" to "CardPropertiesField"
and add it as widget to use for properties fields in calendar views.

The rationale is that the "Show in cards" option of properties should
allow to enable the visibility of properties in kanban cards and in
calendar popovers (as it is currently the case in knowledge).

Task-3458627

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Adrien Schoffeniels b8b450544c [IMP] web: remove hideKanbanOption from properties field
Purpose:
--------
This commit removes the "hideKanbanOption" from the properties field.
This option allowed to prevent users to make properties visible on cards
(kanban cards and calendar popovers).
The rationale being that there is no reason to prevent users of adding
properties on cards now that they have been redesigned (see commit [1]).

Task-3458627

[1]: https://github.com/odoo/odoo/commit/25e8fbe0a1327c289df826cf6eb7882098a4c325

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Rémy Voet (ryv) cae4e1b1cf [FIX] web: add fallback of display_name in formatMany2one.
Since https://github.com/odoo/odoo/pull/137098, we add a fallback for
false display_name in the form view, but we didn't add it for the list
view which doesn't instantiate the Many2one component. It uses
`formatMany2one` instead. Fix it to be consistent with the Many2one

closes odoo/odoo#139215

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-10-20 09:35:23 +00:00
Rémy Voet (ryv) c3bbba7cdd [FIX] web: fix extraLines for false display_name
Since https://github.com/odoo/odoo/pull/137098, in
`Accounting > Bank > Tree View`, you get a traceback if one of the bank
statements in the view has a false as `display_name` (name is only
required in the view not in the model). The traceback comes from the
`extraLines` accessor in the Many2one component. The fix is the same
as in https://github.com/odoo/odoo/pull/138061 (FW of the first PR).

Part-of: odoo/odoo#139215
2023-10-20 09:35:23 +00:00
Michael (mcm) 8cf98fbe67 [IMP] *: remove core.bus
This commit removes the legacy global bus (core bus) and the places
where it was used.
The main users of this bus were the public widgets, they now use the bus
on Component.env.
Some of the uses were dead code and has been removed.

closes odoo/odoo#139076

Task: 3439226
Related: odoo/enterprise#49131
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-10-20 09:35:21 +00:00
Arthur Detroux (ard) 7594d71ca8 [IMP] *: remove jQueryUI draggable and droppable
*: mass_mailing, test_website, web, web_editor, website, website_event,
   website_sale

This commit removes jQueryUI draggable and droppable component to
instead use our own implementation of the feature. This replaces the
last use of the lib: the web_editor drag and drop. This takes advantage
of the code that was already written for other features of the backend.

task-3079246

closes odoo/odoo#136793

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-19 22:01:48 +00:00
Adrien Dieudonné 1158c45e4a [REF] *: remove .oe_left and .oe_right
The first intention of this commit was to remove ´@extend´ but
it actually makes sense to remove ´.oe_left´ and ´.oe_right´ classes.

Since grid we can avoid "float" elements (see .oe_subtotal_footer)
and we only have to remove this class.
For the other case, we have to use ´.float-start' and ´float-end´
to replace ´oe_left´ and ´oe_right´.

closes odoo/odoo#139199

Related: odoo/enterprise#49211
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-10-19 18:02:21 +00:00
Julien Mougenot 8b5c9723d1 [FIX] web: remove arrow from statusbar side dropdowns
This commit removes the caret from the statusbar side dropdowns as it
was not intended to appear and causes the buttons to be misaligned.

closes odoo/odoo#139168

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-19 18:02:15 +00:00
FrancoisGe f0efa1dca8 [FIX] web, im_livechat: click twice on a record in a x2many
Before this commit, if you click twice on a record in x2many, two dialogs
are opened containing the same record.

Solution:
=========
Prevent a record from being opened as long as a record in this x2many
is already open.

How to reproduce:
=================
Go to a form view with an x2many
Click on the first record in the x2many
Click a second time on the record of the x2many (before the dialog is opened)

Before this commit:
-------------------
Two dialogs are opened with the selected record

After this commit:
------------------
Only one dialog is opened with the selected record

closes odoo/odoo#138984

X-original-commit: 31a9b13
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-10-19 14:47:29 +00:00