Commit Graph
15523 Commits
Author SHA1 Message Date
Hubert Van de Walle (huvw) a5752e1e65 [FIX] web: parseMonetary with NBSP as a thousands separator and no currency
Steps to reproduce:

  - Switch language to french
  - Refresh the page
  - Create a new payment
  - Select a partner
  - Enter an amount of 100000,00
  - Save the record
  -> The following field is incorrect: amount

Cause of the issue:

 Since https://github.com/odoo/odoo/pull/97425 ,
 `parseMonetary` wrongly assumed that a currency was always passed in
 the parameters

opw-2937403

closes odoo/odoo#97861

X-original-commit: 9d518f847d2204fc5159a92bc4e4de655acf88fa
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-08-10 01:59:48 +02:00
Lucas Perais be4b211ffe [FIX] web: ask to save new record before translating
Fixup for 4caa9596bc, where a rebase went bad.

Have a translatable field in a form view.
Create a new record with that form view.
Click on the button to open translations for that field.

Before this commit, the record was not before opening the translation dialog, hence
changing the translations could not work properly.

After this commit, this feature is back, and we ask to save a new record before
opening the translation dialog.

closes odoo/odoo#97824

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 22:48:53 +02:00
FrancoisGe bd6b98a65f [FIX] web: save a record with an invisible required field
Before this commit, it was impossible to correctly save a record
containing an invisible required field in its template.

Problem:
When a record tries to be saved or switched to readonly, it will check
the validity of all its fields and if any of them are invalid, it will
cancel the save or switch to readonly. In our case, we have an invisible
required field. If this field is invalid, it is impossible for the user
to modify it because it is invisible. So he cannot make it valid. So it
is not possible to save this record or to switch it to readonly mode.

Solution:
We no longer check the validity of invisible fields.

How to reproduce:
- Go into a list view with a template containing a field that is
    invisible and required
- Click on Create
- Click on Save after editing the record

Before this commit:
    The record doesn't save itself and doesn't go into readonly mode
After this commit:
    The record is saved and in readonly mode

We have the same problem in the form view.

closes odoo/odoo#97610

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 10:15:48 +02:00
Jorge Pinna Puissant 34ddcab07f [IMP] web: Tooltip UX on touch-enable devices
Before this commit, in a touch device the behaviour was a
"tap-hold-to-show” which let the user see the Tooltip by pressing the
element, and letting it disappear when the pressure ends.

This commit allows choosing between the previous "tap-hold-to-show"
behaviour and a new "tap-to-show" which let the user see the Tooltip by
pressing the element, and keep it open until it press something else.
This behaviour is more adapted when the tooltip is on a specific icon,
as is the case for the labels, since : f981c5f8f0

closes odoo/odoo#97680

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 09:00:02 +02:00
Lucas Perais 4caa9596bc [FIX] web: ask to save new record before translating
Have a translatable field in a form view.
Create a new record with that form view.
Click on the button to open translations for that field.

Before this commit, the record was not saved before opening the translation dialog, hence
changing the translations could not work properly.

After this commit, this feature is back, and we ask to save a new record before
opening the translation dialog.

closes odoo/odoo#97608

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 08:59:57 +02:00
Lucas Perais 63eb7fc023 [FIX] web: record's images correctly cached by the browser
Before this commit, images' url where just built upon the record's id and model.
Since the browser caches GET requests by url, the same record would always have the same image url.
Hence it appeared that when changing a record's image in form view, and going back
to the kanban, the image displayed was the old one.

A good enough approximation to solve this (and was actually solved in legacy code), is to use
the record's __last_update field, which basically tells the browser to re-fetch
a record's image when then record go through any modification.

After this commit, images are correctly updated in kanban and form views.

closes odoo/odoo#97544

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-09 08:59:53 +02:00
Eleftherios Kritsotakis 668ea0fa75 [FIX] web: BlockUI stays hidden at PoS backend
Before this commit, the `BlockUI` component
would not appear when printing a Sales Report
from the PoS backend.

To reproduce, go to PoS:
-> Reporting
-> Sales Details
-> click Print
Issue: The `BlockUI` component should appear on
top of the `Dialog` component, but it doesn't.

The reason for this is because, after some recent changes,
the z-index of 1100 that this component initially had, was
no longer applied, resulting at a lower z-index value for
the `BlockUI`.

In this commit we restore the normal behaviour.

task-2924335

closes odoo/odoo#97730

X-original-commit: 114fbe04eb92248118af46c8cbd137da7233aef9
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-08-09 07:47:58 +02:00
Pierre Paridans 2a2f605a32 [FIX] web: list view optional columns button top border
Steps to reproduce:
- Open Online Appointment in list view
=> a "double-border" is visible above the optional columns button

closes odoo/odoo#97592

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-08 22:15:48 +02:00
Aaron Bohy 39b3c6c3e6 [FIX] web: FormView: correctly eval domain involving id
Before this commit, modifiers containing conditions on the `id`
field weren't always correctly evaluated in form views. This
happened on new records, when the `id` field wasn't present in
the view. In this case, its value in the evalContext was
`undefined`, so a domain like `("id", "!=", "False")` was always
evaluated to true. The `id` field is handled a bit differently
than the other ones, as we do not require for the field to be
present to use it in modifiers (mostly because we don't need it
to be present to know its value).

This commit fixes the issue by forcing a `false` value for `id`
when the record has no id yet.

closes odoo/odoo#97587

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-08-08 22:15:44 +02:00
William Braeckman 0f4904a0f1 [FIX] web: fix invalid class being used in search_panel
odoo/odoo#87678 redesigned part of the search_panel however one of the
old bootstrap calsses was still used which resulted in sub categories
rendering poorly.
This commit changes that class to the new name.

closes odoo/odoo#97585

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-08 21:03:23 +02:00
Pierre Paridans 72f0897313 [FIX] web: list view optional columns icon position
Before this commit, the column customization icon sometimes covers the
last column header in list views (or the 'ordering carret' icon).

Steps to reproduce:
- open Survey in list view
=> Avg Score column header overlaps with the icon

This commit adapts the headers last column's padding and the
customization icon's width to match each other and avoid overlapping.

It also adapts the vertical positionning of the icon.

task-2816987

closes odoo/odoo#97562

Related: odoo/enterprise#30165
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-08 21:03:06 +02:00
Pierre Paridans deaae51fb5 [FIX] web: reorder assets as webclient/* defines base elements for views
`webclient/*` defines the main infrastructure for views and as such also
global components/utilities (like Odoo Icons variables/utility classes).

But, as the `views/*` are included *before* `webclient/*`, they can't
use SCSS variables defined in `webclient/*`.

This commit fixes it by interverting their order, which has a
significant effect on the SCSS output, but not the JavaScript (as the
modules system is responsible of the imports order, not the bundler).

Part-of: odoo/odoo#97562
2022-08-08 21:03:06 +02:00
FrancoisGe 74562c8a41 [FIX] web: press a key when focusing column header
Before this commit, if the header of a column (X2many/ListView) has the
focus, a record is being edited and a key is pressed, then a crash is
displayed.

closes odoo/odoo#97559

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-08 21:02:50 +02:00
Pierre Paridans 72357b4751 [FIX] web: don't hide datepicker on scroll for iOS
This commit fixes a glitch on iOS (both iPhone & iPad landscape) where,
when the user attempts to open the datepicker of a custom filter's
field, it pops up and immediately close.

This is due to the desktop behavior which hides datepickers on scroll to
avoid hidding fields behind it.

In our case, a scroll is triggered once the focus is set in the date's
input and the virtual keyboard opens up... which then hides the
datepicker!

Sadly, this behavior's purpose being still useful in desktop, we don't
have much other solution than "just" disabling it on affected platforms
(ie. iOS) as it affects both small screens (ie. iPhones) and
dekstop-like ones (ie. iPad).

Hopefully, a better solution will be found at some point in a future
version, avoiding this kind of "trick"...

Note: replacing the "scroll" event with the "wheel" event seems to fix
the issue at first glance... but actually has side-effects for devices
using both touchscreens and a mouse (ie. 2-in-1 laptops).

Steps to reproduce:
- Open any collection view (list, kanban...)
- Open "Filter" dropdown and add a custom filter
- Choose a date/datetime field (ie. created_on)
- Tap the input
=> datepicker opens up and close immediately

opw-2671618
opw-2819299

closes odoo/odoo#97521

X-original-commit: 1895411d29b2b803c36bded11ba79c92e5c8756d
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-08 19:22:47 +02:00
Lucas Perais 8805b7565e [FIX] web: ColorField triggers onchange when is changed
Have a color field with an onchange on it.
Change the color.

Before this commit, the onchange was not passed to the server. This was
due to the internal of ColorField, which refreshed its value to the old one
even before owl or odoo did anything.

After this commit, the call to onchange is correctly passed.

closes odoo/odoo#97476

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-08 16:01:07 +02:00
Lucas Perais b62f494c0d [FIX] web: form: click on create always opens a form in edit
Spawn a form view with a record and set its props "mode" to readonly.
Click on "Create".

Before this commit, the new record was in readonly mode.
This is never what we want, we always want a new record to open
in edit mode.

After this commit, the new record is in edit mode.

closes odoo/odoo#97451

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-08 16:01:04 +02:00
Xavier BOL (xbo) 03657d741d [IMP] web: add kanban option to prevent dragging columns
Before this commit, when the kanban view is grouped by m2o field, the
columns can be resequence by doing a drag and drop on one of them. In
some cases, this resequence should be disabled to keep the order of the
columns in the kanban view. For instance, in the project sharing
feature, the views are accessible by the portal users to easily follow
the tasks in the project shared but the actions allowed to the portal
user are restricted to only one model (that is `project.task` model).
So, in that case, the order of the columns should always be the same.

To avoid doing a customization code to be able to prevent the
resequence of columns in the kanban view, this commit adds a new option
in the kanban view called `groups_draggable`. By default, this option
will be true to allow the user to resequence the kanban columns
(if the field used for the group by is a m2o and not readonly).
If the option is false then the resequence of the kanban columns will
be disabled.

task-2941335

closes odoo/odoo#97447

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-08 16:01:00 +02:00
Jorge Pinna Puissant a838cac92c [REF] web: legacy_fields, standardize the parameter
Before this commit, the parameter sent to the legacy fields were
different if the field was used on the form view, or on the kanban/list
view. Specifically, the attrs were not sent when the field was use on
the form view, and the viewType was not send when the field was use on
the kanban/list view.

Now, we standardize the parameters sent to the legacy fields regardless
of the view they are used on.

closes odoo/odoo#97431

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-08 16:00:57 +02:00
Aaron Bohy 36612a342b [FIX] web,barcodes: tests: cleanup after tests
In the QUnit test suite, we have cleanup code that runs after each
test to ensure that event listeners, setTimeouts... registered
during a test are removed. This is particularly useful for services,
as they do not have a "destroy" function to cleanup those handlers
they would have registered at startup. Side note: they don't
because it would only be useful for tests, as a service lives
forever in the prod environment.

Before this commit, that cleanup code didn't remove callbacks
registered with a setInterval. Moreover, we didn't remove event
handlers bound on document.body either. As a consequence, there
were memory leaks in the test suite (e.g. callbacks of the tooltip
service), and some crashes could occur if the user interacted with
the window after test completion.

closes odoo/odoo#97100

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-08 14:17:11 +02:00
Géry Debongnie f88a1e9e7e [FIX] web: make css rules applying to oe_stat_button less specific
Before this commit, the rules on oe_stat_button only applied if the stat
button was a direct child of the button box.  However, this is a problem
with the way fields are now wrapped in a div, so it is no longer
possible for a field to be styled like a stat button.

With this commit, we simply make the rule less restrictive.

Part-of: odoo/odoo#96865
2022-08-08 12:33:11 +02:00
Géry Debongnie fb0bebc6cf [FIX] web: add display:contents to wrapper div in fields
With the new views in owl, we wrapped every field in a div with the
class o_field_widget. This is a good thing in general, but it has the
issue that before this commit, the display property was set to
inline-block, in all cases.

With this commit, we set it to 'contents', which means that it will
simply get the correct display value from its content.

Part-of: odoo/odoo#96865
2022-08-08 12:33:11 +02:00
Géry Debongnie 130a7d9ee1 [IMP] web, web_tour: improve isVisible helper
Before this commit, the isVisible helper would most of the time work as
expected, except if an element has display: contents.  In that case, it
has no bounding box, but it may still be visible if one of its child
is visible.

This is particularly important since we want to set the display property
of all field components to "contents".

Part-of: odoo/odoo#96865
2022-08-08 12:33:11 +02:00
Horacio Tellez bf3942b553 [IMP] sale: progressbar js logic migration to owl framework
This PR is part of the whole migration of the sale javascript
code and related code to the owl framework.
Why: better developmet framework for javascript code in odoo.

This PR in particular targets the progressbar of sales team
appearing on the CRM app.

Task - 2918635

closes odoo/odoo#95565

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-08-08 10:50:54 +02:00
stefanorigano (SRI) d198ebbaf2 [FIX] web: 'text-muted' links, remove opacity-changes on hover
Remove exception initially introduced for 'o-btn-link-variant' mixin
when handling 'text-muted' links.

The opacity-change wasn't really needed and introduced inconsistencies
with other links designs and with the mixin logic.

In case of complex/custom scenarios that requires opacity-changes,
'o-opacity-x' utility-classes can be used to achieve the desired design.

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2865713

Part-of: odoo/odoo#93049
2022-08-08 10:50:47 +02:00
stefanorigano (SRI) 819d6f3171 [IMP] web: create a variable defining the form separator color
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2865713

Part-of: odoo/odoo#93049
2022-08-08 10:50:47 +02:00
tsm-odoo d998c54feb [FIX] mail, bus: fix mock sendone/many crash during tests
The mock of sendone/many was relying on the bus_service. Since owl.Component.env
is changing during tests setup, the bus_service was not always defined. In order
to make this more reliable, the longpolling/poll route is now mocked, returning a
promise that can be resolved by the sendone/many methods.

closes odoo/odoo#97298

Related: odoo/enterprise#30059
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-05 16:35:45 +02:00
Adrien Schoffeniels 9c5b5a9dfd [IMP] web: allow commands to be middle-clickable
Purpose
=======
Allow commands in the command palette to be opened in a new tab by
either CTRL+clicking on the command, CTRL+ENTER or right clicking and
copying the link/opening in new tab.

Specifications
=============
Add new slot `focusMessage` that displays the message (if device is not
a mobile device). The `href` value has then to be defined in the
registry.

Task-2710445

Part-of: odoo/odoo#94241
2022-08-05 12:09:54 +02:00
Adrien Schoffeniels a84736d610 [IMP] web: slightly change command palette' scss
Purpose:
========
Knowledge's command palette layout is standardized so that its layout
matches the one of the standard command palette. Therefore,
"o_command_left" is not used anymore and its style is removed. 
Fix a small typo: ".test-ellipsis" to ".text-ellipsis".

Task-2710445

Part-of: odoo/odoo#94241
2022-08-05 12:09:54 +02:00
Fabien Pinckaers f981c5f8f0 [IMP] web: FormView: field tooltips UX
- Less Overwhelming: reduces the hover zone to an icon. Tooltip
appearances are less intrusive as you move the mouse in the screen
- More discoverable: show an icon for the fields that have a tooltip
- better UX: max-width on the popup

closes odoo/odoo#97440

Note: commit 3363e55cac reduced help messages to useful ones.
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-05 09:37:16 +02:00
Hubert Van de Walle (huvw) 92e700fc08 [FIX] web: parseMonetary with NBSP as a thousands separator
Steps to reproduce:

  - Switch odoo language to french
  - Create a client bill for Azure Interior of $1 000 000
  - Confirm it
  - Go to the accounting dashboard
  - On the bank, click on reconcile
  - Select Azure interior
  - Click on the correct bill
  - Switch to Manual operations
  -> $1 000 000 is not a correct monetary field

Cause of the issue:

  Recently in https://github.com/odoo/odoo/pull/94126 , `formatMonetary`
  switched from joining the currency and symbol from `&nbsp;` to a non
  breaking space, NBSP.
  To parse monetary values, the behavior was to split around NBSP to
  get the symbol on one side and the value on the other which is then
  passed to `parseFloat`.

  For the following examples, NBSP is replaced with an underscore.
  So `$_1000` becomes `$, 1000`
  But some languages such as french uses the same char as thousands
  separator.

  In that case, `$_1_000` becomes `$, 1, 000` and then the parse fails.

opw-2937403

closes odoo/odoo#97513

X-original-commit: 9d36722797669498dfd1ad4659e5f29347ba30f3
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-08-05 04:44:56 +02:00
Xavier BOL (xbo) 650d0679c0 [FIX] web: fix autofocus when input type is 'number'
Before this commit, when the autofocus is used on an input with
`type="number", the `selectionEnd` is not available because the input
element's type ('number') does not support selection.

This commit checks the input type is not a number:
- if it is the case then the selection is used to place the cursor at
  the end of the input content,
- otherwise the selection properties are not used and the input is
  simply focused.

closes odoo/odoo#97466

X-original-commit: 38a5de7b2962a47c29b23f12f2ea7599bdea11fd
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-05 03:38:20 +02:00
FrancoisGe ed237addb1 [FIX] web: ListView click on sortable column header
Before this commit, in a list view with a record being edited, if you
click on the header of a column sortable and press a key then a
crash is displayed.

Solution:
We will unselect the record when we click on a column header
(sortable or not). It will be impossible to focus the header of a column
when a record is in edit mode. Either the record is in readonly mode,
or it is invalid and the invalid field is focused.

How to reproduce:
- Go to a list view
- Switch a record to edit mode
- Click on the header of an sortable column
- Press a key (for example "a")

Before:
    Crash is displayed, the record is still in edition and the header
    of the column is focused.

After:
    When you click on the header, the record switches to readonly mode
    and the header of the column is not focused.

closes odoo/odoo#97433

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-05 00:29:47 +02:00
Lucas Perais 9b81ddb993 [FIX] web: settings form view: save on click on an action button
On the res.config.settings form view, click on button that will do an action
e.g. defined as some flavor of `<button type="object" name="myMethod" />`

Before this commit, this did not work as we never fully created the res.config.settings record in python
hence, when executing myMethod on the model res.config.settings, the ID was unset, pointing to no record.

After this commit, we "create" in python the transient res.config.settings record before doing anything.

closes odoo/odoo#97428

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:11:03 +02:00
Dardenne Florent (dafl) 13e9388c87 [FIX] web: restore specialData when discarding
Changed specialData (as in statusbar) were not discarded when clicking "Discard".
Now, when a form is Discarded, the specialData is restored.

Example: In project.task form view, there is a statusbar in which the domain depends on the project_id.
Edit a task, remove the project and the statusbar is updated. When discarding, the statusbar
is not restored to his initial state. Now it is restored to his initial state.

task_id: 2811530

closes odoo/odoo#97164

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:10:57 +02:00
Lucas Perais 6c155e1713 [FIX] web: relationalModel: basic keys supported in record context
Have an editable list view, displaying a many2many tags field. The m2m field
has a context, mentioning `active_id`. (`context="{'default_field': active_id}"`)

"basic context keys" is to be understood as the usual suspects: active_id, active_ids, current_company_id, active_model

Type something in the m2m input, and selet create and edit, in order to create a new record in a dialog form view.

Before this commit, there was a crash because active_id was not present in the evaluation context.

After this commit, the new record opens in its form view, with the right value for the field that must have a default.

closes odoo/odoo#96910

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 18:35:32 +02:00
Michael (mcm) b3bc5a0a03 [FIX] web: less bounce edit form button
Before this commit, the edit button in form view bounced on any click.
Now, the button bounces only when clicking in the area of a field or its label.

closes odoo/odoo#96784

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 18:35:29 +02:00
luvi 9c4590f6fb [IMP] web: improve ImageField style
This commit improves the style of the image widget
to use more approriate icons for edition/deletion.
Before this commit, a rectangle was covering the
entire image to highlight those buttons. Now, only
those are visible and highlighted on desktop when
hovered, while being always visible on mobile.

This will improve the visibility of this field
with views being always-edit.

task #2860958

closes odoo/odoo#97208

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 13:54:24 +02:00
stefanorigano (SRI) 6b41d20815 [ADD] web, *: transition-x utility classes
Define classes for some default bootstrap transitions + 'none'.
These values are generic enough to fit different circumstances.

Classes added:
- transition-base
- transition-fade
- transition-none

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

closes odoo/odoo#97051

Related: odoo/enterprise#30066
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) d8bbddb9a7 [ADD] web: font-sans-serif utility class
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) b89296c12b [REM] *: drop o_debounce_disabled class in favor of bootstrap defaults
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) 71611ff3c0 [REM] *: drop bg-muted class in favor of bootstrap defaults
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:14 +02:00
stefanorigano (SRI) 6eeecd19b5 [REM] *: drop custom bg-[color]-light classes
Drop custom `bg-[color]-light` classes in favor of BS's background
color opacity system.
ref: https://getbootstrap.com/docs/5.1/utilities/background/#opacity

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) e377a08417 [IMP] web, *: size and position utility-classes
Improve BS default size and position stack adding classes to fine-tune 
the layout in several circumstances. Classes added:

- 'position-[device]-[position]'
- 'mw-[device]-[size]'
- 'mh-[device]-[size]'
- 'flex-basis-[device]-[size]'
- 'z-index-[0, 1]'
- 'overflow-[x, y]-[overflow type]'
- 'min-w-0'

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) bd2a1110a0 [REM] *: drop o_cursor_default & o_cursor_pointer classes
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) fe5a3a89fb [IMP] web: opacity-x utility classes
This commits adds the '$o-opacity-disabled' value in the opacity
utility class generation list,  allowing to use the 'opacity-disabled'
class to style on the fly elements that don't support disabled states by
default (eg. generic divs)

The commit introduces also a new '.opacity-trigger-hover' class.
It can be applied on parent elements in order to trigger their children
opacity states. Eg:

   <div class="opacity-trigger-hover">
       <span>Always visible</span>

       <span class="opacity-0 opacity-100-hover">
           Visible when parent is :hover
       </span>
   </div>

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:11 +02:00
Aaron Bohy a8e84d33c9 [FIX] web: debug: don't highlight legacy fields in legacy views
In debug mode, we highlight legacy fields with a red background
and legacy views with a red top border. Legacy views only use
legacy widgets. There's no point highlighting legacy fields inside
legacy views.

Note that these highlightings won't be in v16, their purpose is to
ease the identification of legacy/wowl fields/views during the
conversion phase.

closes odoo/odoo#97415

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 11:45:42 +02:00
Aaron Bohy b48148a702 [REF] web: tests: remove QUnit.skipWOWL
This function helped us managing the transition from the legacy
/web codebase to owl, and we don't need it anymore as there's no
test using it.

Part-of: odoo/odoo#97415
2022-08-04 11:45:41 +02:00
Lucas Perais 6260816c56 [FIX] web: legacy form view dialog opened with res_id and view_id
Open a record in a many2one.
Make the form view to take a js_class that is an extend of the legacy form view

Before this commit, the resId of the record and the view id were not transmitted to the legacy form view dialog.

After this commit, they are.

closes odoo/odoo#97385

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 11:45:35 +02:00
FrancoisGe 054c2f21df [FIX] web: FormView with OuterGroup empty
Before this commit, if a form view has a group containing only invisible
elements and at least one invisible group, then the view crashes.

Example:
    <form>
        <sheet>
            <group>
                <group invisible="1">
                    <field name="foo"/>
                </group>
            </group>
        </sheet>
    </form>

The solution is to have an empty list as the default props for the
OuterGroup slots. OuterGroup is a group containing at least one other group.

closes odoo/odoo#97295

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 11:45:28 +02:00
FrancoisGe 9569438643 [FIX] web: filter_domain with an integer value
Before this commit, an error was returned when opening a view if the
view's searchArch contained a field with a filter_domain and the view's
context contained an integer "search_default_" for that field.

Example:
<search>
    <field name="m2o" filter_domain="[('m2o', 'child_of', raw_value)]"/>
</search>

context: {
    search_default_m2o: 1,
}

Part-of: odoo/odoo#97295
2022-08-04 11:45:28 +02:00