Commit Graph
14787 Commits
Author SHA1 Message Date
Samuel Degueldre 2d42501a5b [FIX] mail, web: fix memory leak in QUnit test suite
With the discuss refactoring, two memory leaks were introduced:
- the activity service opens a broadcast channel for cross-tab
communication.  Because services have no destruction mechanism, the
broadcast channel is never closed, and since most tests create their own
test environment with services, each test would leak an instance of the
activity service as it is captured by the bound onmessage function. The
activity service holds a reference to the mail store which results in a
large leak
- the RelativeTime component creates a timeout so that it can update its
time every minute or every hour depending on how old the message is,
this timeout is cleared when the component is destroyed. This component
tries to initialize the value of its timeout to `null`, but it does so
*after* calling the method that actually sets the timeout, causing the
timeout to be overriden with null and never cleared

The BroadcastChannel problem has been solved by adding BroadcastChannel
to the browser object, and patching it in the test setup code of web, as
it's a generic problem with BroadcastChannels. The timeout problem has
been fixed by simply reordering the lines so that we don't override the
timeout and it gets correctly cleared when the component is destroyed.

closes odoo/odoo#128768

X-original-commit: bd25f14d7a746fe48e09edea7ebb4aaa4634fbdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 19:26:05 +02:00
mano-odoo 3df4eaff92 [FIX] *: minor settings spacing issues
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.

The nested checkboxes were growing too much on smaller screens
making the content overflow.

This commit adapts these checkboxes settings to make them more readable
and consistent.

It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.

In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.

Task-3113372

closes odoo/odoo#126347

X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-07-17 19:26:03 +02:00
niyasraphy 711024339f [FIX] web: field check/uncheck on clicking on neutralize label
before this commit, in the database manager page, on
clicking the Neutralize label in the db duplicate
and restore page is not check/uncheck the neutralize
checkbox.

after this commit, on clicking the label Neutralize
the field can be checked and unchecked as other field
in the same form.

closes odoo/odoo#128671

X-original-commit: 64e3d52591db49a4a441f170e216f0e3aca4fa23
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-07-17 10:40:44 +02:00
Benoit Socias 388e4bb2bf [IMP] website, web_editor: relayout theme options
This commit reorganizes the theme options to make them easier to find.
It also adds the following options:
- 'Font size' for each of the six headings
- 'Font (family)' for each of the six headings
- 'Margins' (top & bottom) for paragraph & the 6 headings
- 'Line Height' for paragraph & the 6 headings
- Harmonize buttons options with the custom button ones

task-3140991

Part-of: odoo/odoo#111621
2023-07-17 10:40:31 +02:00
Aaron Bohy e13f3103e2 [FIX] web: view compiler: honnor class attribute on widget
Commit [1] inadvertently broke the handling of the "class"
attribute on a <widget> node, in the view compilers. When set,
the value of the "class" attribute was given in props to the
Widget component as "name", instead of "className".

[1] https://github.com/odoo/odoo/commit/0b574df2599da3dae66b9785198420d707a280a3

closes odoo/odoo#128646

X-original-commit: 3024f2121848ec414d596ef9c3eb0a1bd7e6cfd2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-17 09:21:18 +02:00
Antoine (anso) 4510559051 [FIX] web: avatar picture object fit
Prior this commit, non perfectly squared `.o_avatar` images were
not correctly fitted in the their boxes

task-3419159
part of task-3326263

closes odoo/odoo#128526

X-original-commit: cbe665eb2929a01e12714ae8e3fe66610780e7b9
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-15 12:00:36 +02:00
Antoine (anso) b9de651da4 [FIX] web: status bar buttons dropdown on mobile
On smaller screens, `.o_status_bar_buttons` are displayed in a dropdown.
This commits reset the styles of these buttons when they are displayed
in the dropdown, so they look like regular dropdown items

task-3414462
part of task-3326263

closes odoo/odoo#128462

X-original-commit: 071d92b3926f6a062ca3b0b0c9c70d8567bb6899
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-15 10:54:33 +02:00
Julien Carion (juca) 75481e2db0 [FIX] web: fix project calendar display name
This commit removes the displayName variable of the calendar controller
since it wasn't used anymore and the extension of the displayName is now
updated in the ProjectCalendarController instead. This fixes an issue in
project where the extension of the displayName in the project calendar
controller ( - Tasks by Deadline) would not be shown in the view.

opw-3410987

closes odoo/odoo#128461

X-original-commit: 120ab2513b487d0c117e5c67ed76e6d154d0243f
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-15 10:54:31 +02:00
Benoit Socias 4095539765 [IMP] base, web: upload a JPEG too when uploading a WEBP in backend
The library used to generate PDFs does not support the WEBP image
format. For those images to be included in reports, they need to be
converted. For security reasons, this conversion cannot be done on the
server, therefore it was decided to keep an already converted copy of
such images.

This commit converts uploaded WEBP images to JPEG and uploads them both
so that the report generation can use the JPEG instead.
This commit also pre-generates the resized version of images - and JPEG
versions of each of them.

task-2774352

Part-of: odoo/odoo#85494
2023-07-15 05:10:46 +02:00
Benoit Socias d1292a96a6 [IMP] base,*: support image/webp image format
*: mail, mrp, test_website, web, web_editor

Before this commit '.webp' images could not be used in odoo.

After this commit '.webp' images can be uploaded to odoo.
- can be used in image field
- can be used in HTML field image
- can be used in mails and website
- can be transformed (shape mask, filter effect, crop, rotate, resize,
  adjust quality)

task-2774352

Part-of: odoo/odoo#85494
2023-07-15 05:10:45 +02:00
Audric Onockx (auon) 09a90aa9ca [IMP] project,web: change groupby project label 'None' to 'Private'
Be consistent with the terminology used in all views,
'None' doesn't add value and makes the private task stage user-friendly.

Add filter "Private Tasks" to search private tasks easily.

task-3300649

Part-of: odoo/odoo#120668
2023-07-14 15:34:35 +02:00
Arthur Detroux (ard) 51b1808ebe [REF] web, *: make web.public.widget independent of web.Widget
*: im_livechat, website_event, website_event_track_live,
website_livechat

The goal of this commit is to ease the removal of web.Widget while
keeping web.public.widget.

The reason we want to keep the public widget is because it is not
currently possible to hook OWL components to existing DOM elements,
which is mostly what is done in the frontend.

To remove the inheritance, most of the code from web.Widget was
duplicated into web.public.widget.

This commit also adapts a few widgets which were using web.Widget as
frontend widgets.

However, there are still legacy widgets used both in the backend and the
frontend. Those were not adapted.

This commit adapts the following widgets:

- website_event: EventRegistrationForm
- website_event_track_live: WebsiteEventReplaySuggestion
- website_event_track_live: WebsiteEventTrackSuggestion

The modules that still use web.Widget but were not adapted can be listed
by using: `odoo.__DEBUG__.getDependents("web.Widget");`

Following this commit, any new frontend widgets should exclusively use
web.public.widget. They should have done so before, but in the near
future, widgets using web.Widget will no longer work.

task-3249625

closes odoo/odoo#117210

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-07-13 19:27:52 +02:00
Arthur Detroux (ard) afbbf75ec9 [MOV] web: moving the RootWidget definition after PublicWidget
In the next commit, the PublicWidget class will be made independent of
the legacy Widget class.

Therefore, the RootWidget cannot be defined before the PublicWidget as
it will extend the PublicWidget rather than the legacy Widget.

This commit moves its definition after the PublicWidget definition.

task-3249625

Part-of: odoo/odoo#117210
2023-07-13 19:27:52 +02:00
luvi 7c07a73b6c [FIX] web,*: properly format phone href
*: mail

This commit fixes the href used by the PhoneField. Following the
specs of a phone uri, spaces must be removed from the phone number
when using the href attribute.

A test has been added to verify that any spaces are removed from
a given phone number.

In mail, the SMS button href has been edited for the same purpose.

task-3371999

closes odoo/odoo#128383

X-original-commit: 9ff0270c8acf9596ebd404627c4f5b1a98b37c59
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-13 18:18:06 +02:00
Pierre Pulinckx (pipu) 504b4a7178 [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.

task-3391739

closes odoo/odoo#127406

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 14:47:41 +02:00
Mathieu Duckerts-Antoine 9c8c2a8c30 [FIX] web: model field selector: padding below path description
We make the elements of the path description be a bit above the bottom
line in the model field selector.

closes odoo/odoo#121688

Related: odoo/enterprise#41660
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine db67719fd6 [FIX] web: domain selector: bar below autocomplete
We add the class o_input to the root node of the DomainSelectorAutocomplete
component in order to get a line below the tags and the input value.

Part-of: odoo/odoo#121688
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine fb9629cb6d [IMP] web: domain selector: autocompletion for relational fields
For the relational fields and the operators =,!=,in,not in, we allow
the user to use autocompletion as in a many2one or a x2many field.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine ff2ee462a5 [IMP] web: search bar: facet descriptions
We improve the facet descriptions of the domain created via the domain
selector. We do this in several ways like it was done for the readonly
mode of the domain selector:
    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine 56ede17854 [IMP] web: domain selector: display in readonly mode
We improve the readonly mode in several ways:

    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine e10f965c36 [FIX] web: domain selector: 'New rule' button size
The button "New rule" was too easily clickable since it took a whole
line. We reduce its size.

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine a1365d7655 [IMP] web: model field selector: search on string and name in debug mode
We allow the user to make a fuzzy search on the string and the name of
the fields when the props isDebugMode is true.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00
Mathieu Duckerts-Antoine a3b00f2dca [FIX] web: domain selector: operators with same key
Before that commit, we could get two operators with the same key to
display at the same time. In that case, an error would be thrown by OWL:
Got duplicate key in t-foreach... . We fix that problem.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00
Adrien Schoffeniels a084c5f156 [IMP] web: rename properties 'view in kanban' label
Purpose:
--------
Rename the label "view in kanban" to "display in cards" in the properties
definition popover. The rationale is that the related enterprise PR allows
to display the `article_properties` in the popover of the `item calendar`,
using the kanban properties widget.
Therefore, checking the now called "display in cards" checkbox now allows
to show the property in the kanban cards and in the calendar popovers.

Task-3239985

Part-of: odoo/odoo#121608
2023-07-13 14:47:00 +02:00
Adrien Schoffeniels 5511ffe03b [IMP] web: add onWillStart in calendar's model
This commit allows to define a `onWillStartModel` method in the calendar
controller that will be used as `onWillStart` option of the calendar
model.

Purpose:
--------
The related enterprise PR introduces a new "item calendar" feature in
Knowledge that allows to embed calendar views using article properties
to display these articles in the calendar.

To do so, one needs to modify the fields mapping before the model is
loaded for the first time, so that the records are fetched using the
properties in the search domain.
The `onWillStart` option of the `useModel` function is perfectly suited
for this.

Task-3239985

Part-of: odoo/odoo#121608
2023-07-13 14:46:59 +02:00
Mathieu Duckerts-Antoine bac8c7a5d6 [FIX] web: domain selector dialog: do not validate domain server side
Even with a limit of 1, the domain validation done in the domain selector
dialog at confirmation can be too costly (see PR message). Since we do
not have (yet) the tools to validate quickly domains server side, we
simply drop the validation server side.

closes odoo/odoo#127832

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 03:57:40 +02:00
Mathieu Duckerts-Antoine 15bbf69a76 [FIX] web: domain selector dialog: disable confirm button on click
On confirmation of a domain created in the domain selector dialog, a
validation check involving the server is done. That validation based on
a search_count can be rather/too costly (see PR message). Since the
search_count is done in silent mode and the confirmation button is not
disabled on click, if the validation takes too much time, the user is
lead to think that the first click did not work and clicks again, and so
on...

Here we disable the button on appropriate time to avoid that situation.

Part-of: odoo/odoo#127832
2023-07-13 03:57:40 +02:00
Leonardo Pavan Rocha bc63d134eb [IMP] web: merge quick_add with quick_create_form_view_id
https://github.com/odoo/odoo/pull/114827 added a new attribute in the calendar
view that allowed passing a form view id that is used in the calendar module to
show a different form view when trying to quick create an event. This new
attribute, however, was only used in the calendar module. With this in mind, it
made sense to allow using this attribute in other modules. This commit
implements this, however, the approach used was different. It was decided to
merge quick_create_form_view_id with quick_add as both are related to the
same feature: quick creation of a record in the calendar view. Now, quick_add
receives either a boolean (original behavior) or a number representing the form
view id to be shown when quick creating a record.

task-3286969

closes odoo/odoo#122923

Related: odoo/documentation#4707
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-12 20:33:50 +02:00
Julien MougenotandXavier Bol 029dd9c567 [FIX] web: fix date fields appearance
Before this commit, in readonly daterange fields in list views, if one
of the dates was set, it was unclear which of the 2 fields it was (it
simply diplays the formatted value of the field which is set).

Now, the arrow icon appears on the right or left side to clearly reflect
whether the value is the start date or the end date (list views only).

closes odoo/odoo#127734

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
2023-07-12 16:53:10 +02:00
Julien Mougenot fd64757d82 [FIX] web: fix focus issues with datetime hook
Before this commit, the way focus was handled by the DateTime feature
hook was inconsistent. This caused the date/datetime/daterange fields to
not be able to open the picker when clicking on the "Add start/end date"
button, and effectively lose the value set on the field on save.

This commit introduces a more consistent focus handling as well as a
helper returned by the hook to open the picker on command.

Part-of: odoo/odoo#127734
2023-07-12 16:53:10 +02:00
Julien Mougenot f962d071ad [FIX] web: fix datetime picker buttons overflowing
Before this commit, the "Apply" button in date pickers (not datetime)
would overflow from its popover in desktop view since its position is
set to absolute, and since there are no time pickers to extend the
height of the picker it simply overflows.

This commit ensures that the buttons are correctly displayed when there
are no time pickers.

Part-of: odoo/odoo#127734
2023-07-12 16:53:09 +02:00
Julien Mougenot 44df785656 [FIX] web: use allowed CSS selectors in datepicker
Before this commit, there were some uses of illegal CSS selectors such
as `:not(.classA, .classB)`. The proper way to use multiple `:not`
statements is to chain them. This commit takes care of that.

Part-of: odoo/odoo#127734
2023-07-12 16:53:09 +02:00
FrancoisGe 42e5e247bf [FIX] web: m2o must only use the context of the field
From commit 2ecfed335d, clicking on the arrow of a m2o opens the
record in form view and passes it the context of the current view.
After this commit, only the context defined on the <field> is passed.

Problem:
An example of a problem, is the use of an incorrect active_id in the
second view that is passed through the first form view to the second.
Previously, the active_id of a form view was always the id of the record
and not that of the previous view. This behaviour is debatable, but it
leads to major changes. We therefore prefer to revert to the old behaviour
and no longer pass the entire context in order to avoid this problem.

How to reproduce:
- Go to a form view with a m2o
- Click on the arrow of the m2o

Before this commit:
    The view context contains all the context from the first form
    view and the second.

After this commit:
    The view context contains the context of the m2o field and the second view.

closes odoo/odoo#127538

Taskid: 3394945
X-original-commit: a9bec1fec3ff08461732ef2717457524339eb716
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 16:52:54 +02:00
Adrien Schoffeniels a52e2fdb80 [FIX] web: use right color class for calendar popovers
Purpose:
--------
Currently, the calendar common popover has an incorrect color class if
the value of the field used to color the records in the calendar is not
a number. Therefore the popover header remains grey although the event
is colored, and the header content is misaligned.

This commit fixes this behavior by using the `getColor` method to obtain
the class name to use in the popover, which is the method currently used
to obtain the class name to use in the event. If this method does not
return a number, the default color class (o_calendar_color_0) is used.

Task-3239985

closes odoo/odoo#128169

X-original-commit: b159a98e0f0c89fab91b706895bbc1884a8cbd4e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 09:14:54 +02:00
Lucas Perais 450f79c896 [FIX] web: actionService reports: pass action's context to download
Before this commit, the report action's context was not passed to the download route.
This was problematic as some crucial keys may be forgotten when downloading the pdf.

After this commit, we do pass the full context to the download route, ensuring consistency of the context
across calls.

closes odoo/odoo#126963

Related: odoo/enterprise#43441
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-12 03:48:50 +02:00
Lucas Perais 958209f7c7 [REF] web: SelectMenu: a subtemplate for items
Before this commit, it was not possible to customize the way an item
in the selectMenu was displayed.

After this commit, with the help of a subtemplate, it is now possible
to subclass the SelectMenu and customize how an item is displayed

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Lucas Perais 1e5c256294 [FIX] web: CodeEditor: resource-specific session
The new CodeEditor dismissed the notion of ace EditSession.
This serves to split the ace internals (history, values etc...) according
to the logical unit of a session.

After this commit, from the CodeEditor point of view for each edited resource (a view mostly)
corresponds one session.

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Lucas Perais 49ae7f4d47 [IMP] web: ConfirmationDialog can take a confirmClass props
Before this commit, the confirm button of the confirmation dialog
was always btn-primary.

After this commit, it can take a props to modify that.

Part-of: odoo/odoo#126963
2023-07-12 03:48:48 +02:00
Leonardo Pavan Rocha 79d4a829e5 [IMP] web: many2many_tags_field allow passing noViewAll to Many2XAutocomplete
In sign, we don't want to show the view all option when choosing sign options
for a sign item in a template. This commit adds the noViewAll prop to the
many2many_tags_field component.

task-3233643

closes odoo/odoo#122157

Related: odoo/enterprise#39787
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-11 18:03:10 +02:00
Aaron Bohy b553163b4e [FIX] web: fix clickbot to enter studio
Since [1], the DOM of the studio icon has changed, and no longer
matches the selector of the clickbot menu. As a consequence, it
no longer entered Studio. This commit fixes the selector.

[1] odoo/enterprise#9da0c9fab6c066aa97bc8cb99eb0e54b5a76a08f

closes odoo/odoo#128040

X-original-commit: aba563c58ec890bbf33d4a7d3cc34e9b2a4012a0
Related: odoo/enterprise#43910
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-11 12:00:49 +02:00
clesgow 51de4ab9b5 [FIX] web: handle focus for buttons cells in list
This is reproducible in lots of ways, here's one:
- Inventory -> Products -> Any storable product
- Click on Update Quantity
- Click on the cell where the 'History' and 'Set' button are

This raises a traceback as the `cell` assigned right before is null at
that point. Indeed, since those cells from a special kind of column made
of buttons (o_list_buttons), those don't have a `name` attribute to
find, hence the traceback.

closes odoo/odoo#128014

X-original-commit: 222dc64be51cc8e711278cff96392e755ba39fd4
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-07-11 09:10:24 +02:00
Chrysanthe (chgo) de6650cb8c [FIX] web: fix calendar buttons spacing
=== ISSUE ===

If you open the calendar module with an event with attendees, the status
button showing if the user accepted the invitation or not is missing a
left margin.

=== AFTER ===

We add a `ms-1` class to the buttons to space them correctly.

task-3389679
part of task-3326263

closes odoo/odoo#127976

X-original-commit: 86595f718ec5824d53f49ae7495677dd31551d57
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 18:16:36 +02:00
Julien Carion (juca) 3cc9836400 [FIX] web: fix checkbox component's width
This commit simply restricts the clickable with of any checkbox component
to be restricted to the checkbox (or toggle) itself so that the user can
no longer toggle it from possibly a long range.

opw-3378955

closes odoo/odoo#127118

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-07-10 16:59:14 +02:00
Antoine (anso) 615c5ed6a5 [FIX] web: kanban header vertical padding
This commit reduces the vertical padding of `.o_kanban_header` to
display more kanban cards at a time in the view vertically

part of task-3326263

closes odoo/odoo#127827

X-original-commit: dc5f4f7cef67b256eb50cb15e1ae1f22aa124966
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-10 15:32:56 +02:00
luvi a3b0e9a3c4 [IMP] web: use useAutoFocus hook in SelectMenu
This commit makes use of the useAutoFocus hook to focus the input
when the SelectMenu opens. This usage of the hook can replace the
manual focus that was applied when the dropdown opened.

The feature can hardly be tested with newer tests, since the behavior
is identical, and the focus on the input was already tested.

closes odoo/odoo#127864

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-07-10 14:08:39 +02:00
Maruan Aguerdouh (magm) 66d022a4dc [FIX] web: avoid crash when deleting a property multiple times
Steps to reproduce the bug:
    - Go to Apps, and install the Knowledge App.
    - Go to Knowledge and create an article, and a child article.
    - Inside the child article, go to Properties tab and add a property.
    - Go to edit the property, and inside the popover,click on the
    delete button, atleast 2 times.
    - Now we got more than 1 popover to confirm the delete of the
    property, click delete on all of them.

Issue:
    Once the first popover is confirmed, we properly delete the property
    but now we are going to get an error because the property is already
    deleted and we won't be able to find the property to delete.

Solution:
    We need to check if we can find the property we want to delete
    before doing any further actions.

opw-3371753

closes odoo/odoo#127584

X-original-commit: 7f5aed12fb143928cc82eeeea712363cb79b1171
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-07-08 21:39:43 +02:00
Romeo Fragomeli 69ecba44cb [FIX] web: improve barcode scanner for iOS (Safari)
This commit forces the video element to take all the space available.

Steps to reproduce:
* Open the barcode APP (on iOS device)
* Click on "Tap to scan"
* On iOS the video element doesn't take all space => BUG

closes odoo/odoo#127763

X-original-commit: 29e677ed84c0b7324488cfebf2d44b9247716c54
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-07-07 17:58:03 +02:00
Mathieu Duckerts-Antoine 34f68a5f19 [FIX] web: search bar: is (not) (not) set in facets
Before this fix, a condition like "Foo is not set" created via the domain
selector would be badly described in the facet as "Foo is set".
We fix that problem and add a test that covers that situation and similar
ones.

closes odoo/odoo#127447

X-original-commit: a6b7de5d62906e5508585e0b994bf95544d10476
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 17:57:45 +02:00
luvi 8a4485748f [FIX] web: fix filtering when choices/groups props update
This commit fixes the filtering of choices when the choices or the groups
props values are updated. Before this commit, the filter was only triggered
when the length of choices or groups differ.

Instead, it is prefered to apply the filter of choices whenever those props
are updated (in a dedicated useEffect).

A test has been added, updating the choices props, while having an object with
the same number of choices, while having different values. Before this fix, the
filtering wouldn't be applied correctly, since the filter wouldn't be triggered
because the object has the same number of values in it.

closes odoo/odoo#127733

Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
2023-07-07 16:42:38 +02:00
Julien Carion (juca) 6abd149259 [IMP] web, *: replace search more with view all
This commit changes the behavior of the "Search More..." option in
Many2XAutocomplete and analytic distribution by making it available
as long as there's at least one record in the search results and by
renaming it to "View all".

task-3258625

closes odoo/odoo#126041

Related: odoo/enterprise#43660
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 15:27:50 +02:00