Commit Graph
595 Commits
Author SHA1 Message Date
Bruno Boi 400ffa0861 [IMP] web: update luxon from 2.4.0 to 3.0.1
See [upgrade guide](https://moment.github.io/luxon/#/upgrading?id=_2x-to-30)

Part-of: odoo/odoo#96946
2022-08-02 09:19:56 +02:00
Pierre Paridans a6857f276a [REM] web,debian: remove unused jQuery.touchSwipe lib
Since the revamp of the Kanban View in mobile and the migration of the
Settings view to the OWL views, the jQuery.touchSwipe library is not
used anymore.

closes odoo/odoo#96608

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 03:35:09 +02:00
Géry Debongnie b4063a1e73 [IMP] web: update owl from 2.0.0-beta-14 to 2.0.0-beta-16
Release notes:

https://github.com/odoo/owl/releases/tag/v2.0.0-beta-15
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-16

Details:

- fix: lifecyle_hooks: correctly wrap errors in async code
- imp: use a custom error class for all errors thrown by owl
- fix: package.json: remove browser value
- ref: component_node: slightly simplify code
- fix: components: fix cause left unset when thrown object is not Error

Part-of: odoo/odoo#78221
2022-07-22 16:21:38 +02:00
Géry Debongnie 23caf8b96f [IMP] web: update owl from 2.0.0-beta-12 to 2.0.0-beta-14
Release notes:

https://github.com/odoo/owl/releases/tag/v2.0.0-beta-14

Details:

- [FIX] compiler: better handle update of properties with same value

closes odoo/odoo#95804

Related: odoo/enterprise#29350
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-21 10:19:42 +02:00
abd-msyukyu-odoo 74753681ee [FIX] web: fix dragging a nest in article tree
When dragging an article with an open nest, the `jquery.mjs.nestedSortable`
library does not refresh the positions of the following articles. This forces
the user to drag the nest far below the target position to move the placeholder.

This commit is a small fix to the library, to refresh said positions before
checking for element intersection.

Task-2883290

closes odoo/odoo#95749

Related: odoo/enterprise#29315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-14 16:42:01 +02:00
abd-msyukyu-odoo 4272e239de [FIX] web: prevent flickering when moving an article down
Prevent a flickering effect when dragging item down in a nested tree using the
`jquery.mjs.nestedSortable` library.

Situation:

1.) start dragging, moving down and slightly to the left

.dragged item
.nest0
  .nest00
    .nest000

2.) intersect nest0

.nest0:hover:.dragged item
  .nest00
    .nest000
.drop destination

3.1.LIBRARY) intersect nest00 first trigger

.nest0
  .nest00:hover:.dragged item
    .nest000
  .drop destination (frame 1)

3.2.LIBRARY) intersect nest00 second trigger (slightly below and to the left)

.nest0
  .nest00:hover:.dragged item
    .nest000
.drop destination (frame 2)

frame 1 and frame 2 are rendered almost simultaneously, and in a cycle (after
3.2. comes 3.1. again), resulting in a flickering effect.

3.1.FIXED) intersect nest00

.nest0
  .nest00:hover:.dragged item
    .nest000
.drop destination

drop destination is not allowed to go UP in the dom since the mouse is lower
than before. No flickering in this case.

To go up in the tree, the user can simply move the cursor to the right and/or
up.

The `jquery.mjs.nestedSortable` library will be rewritten internally in the
future to remove the jQuery dependency, but this fix allows a smooth utilisation
in the meantime.

Task-2883290

Part-of: odoo/odoo#95749
2022-07-14 16:42:01 +02:00
Adrien Dieudonne d5bf4ca473 [FIX] web, hw_drivers: bootstrap: removes js bundled Bootstrap file
Some modules used Bootstrap minified bundle but this was replaced
in [1] to avoid using of minified files.

We now want to have the same way to import bootstrap by using non-minified
individually compiled Bootstrap files (bootstrap/js/dist/).

Note that in 'hw_drivers', the js and css part was imported at the
same time but the javascript seems never used...

REF:
[1] https://github.com/odoo/odoo/pull/95450

Part-of: odoo/odoo#95628
2022-07-08 17:10:47 +02:00
Adrien Dieudonne 9d0bf51458 [IMP] web: bootstrap: remove source files
Sources files (boostrap/js/src/) are not used in Odoo.
We actually use:
- All at once compiled code (bootstrap/dist/)
  -> only for /hw_drivers (POS) and /web (database_manager)
- Individually compiled Bootstrap (bootstrap/js/dist/)

REF:
https://github.com/odoo/odoo/pull/95450
https://getbootstrap.com/docs/5.1/getting-started/contents/
https://getbootstrap.com/docs/5.1/getting-started/javascript/

Part-of: odoo/odoo#95628
2022-07-08 17:10:47 +02:00
Adrien Dieudonne 2bc60ad9bd [FIX] web: bootstrap: unwanted triggerTransitionEnd
There is a timeout that force the call to the transitionEnd
to prevent some issue [1]. '_cleanTipClass' callback was then
executed who call getTipElement.
It seems that the tip doesn't exists but the JS is still alive.
After that a crash occurs in [2]: _config is null.

Maybe jQuery was more permissive/defensive before BS5 and this error
was avoided.

So, we had this non-deterministic error:
> UncaughtTypeError: Cannot read properties of null (reading 'template')
Especially in 'test_17_website_edit_menus' with tooltip/popover.

Now we avoid the error in complete by checking if there is an element or
_config not null.

Ref:
[1] https://github.com/twbs/bootstrap/pull/33845/files
[2] https://github.com/twbs/bootstrap/blob/v5.1.3/js/dist/tooltip.js#L630
https://stackoverflow.com/questions/69766375/typeerror-cannot-read-properties-of-null-reading-template-on-bootstrap-tool
https://github.com/twbs/bootstrap/issues/25519

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli c48f57ea25 [IMP] web,*: upgrade to Bootstrap 5.1.3
* = base,http_routing,hw_drivers

- Update Bootstrap from 4.3.1 to 5.1.3

- Update PopperJS to version 2 for Bootstrap 5 (JS part)
  Some code was for PopperJS V1, but it's not compatible anymore.

- Remove some BS5 classes utilities backport

- Fix path for BS5

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:15 +02:00
Géry Debongnie 2fbb759124 [IMP] web: update owl from 2.0.0-beta-11 to 2.0.0-beta-12
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-12

Details

[FIX] compiler: properly handle t-set in t-if with no content

closes odoo/odoo#94868

X-original-commit: 942a7affd03e716d4b3271d2a3d62979ee90f625
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-29 17:11:36 +02:00
Géry Debongnie b36cf87878 [IMP] web: update owl from 2.0.0-beta-10 to 2.0.0-beta-11
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-11

Details:

[FIX] fix some issues with t-out with falsy values, and with default values
[REF] app: slightly simplify the create component path
[IMP] compiler: add support for binary operators
[IMP] add support for t-call-context directive
[FIX] properly get component reference instead of context
[FIX] blockdom: fix crash when class object key has leading spaces

closes odoo/odoo#94798

X-original-commit: 4dc5ff6569f658ccf525e9078b8a776ca5c0f159
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-28 20:42:25 +02:00
Géry Debongnie 2b2fe35ff3 [IMP] web: update owl from 2.0.0-beta-8 to 2.0.0-beta-10
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-9
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-10

Details:

closes odoo/odoo#94523

Fix: event: no crash when using t-on + modifier on slots/components
Fix: component: fix props comparison code
Fix: component: fix wrong behaviour when using t-on on t-component
Fix: component: props values are own property of props object
Fix: t-out: allow expressions evaluating as number
Fix: compiler: add support for #{...} in string interpolation
Fix: compiler: escape backticks in attributes
Fix: crash when dynamic class have leading space
Imp: slots: add support for t-props on slots props
Imp: tooling: add another d.ts file
Imp: app: small scale perf improvement
Imp: app: add fast path for when component has no prop
Imp: validation: add support for value types
Imp: add support for t-call-context
Ref: compiler: remove useless ; in compiled output
Ref: move some code around
X-original-commit: 3c7e2cb5a2224ff624e0899ca392be8b3828b43a
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-06-24 13:49:16 +02:00
Géry Debongnie 362f6b6d5b [IMP] web: update owl from 2.0.0-beta-7 to 2.0.0-beta-8
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-8

Fixes
-----

- portal: allow use of expression to describe portal target
- compiler: fix issue with identifiers with same name
- reactivity: fix memory leak
- app: validate props for root component in dev mode

Improvements
------------

- component: display nice error for wrong child component
- props_validation: have clearer error messages
- component: only useState on props that are already reactive
- compiler: add better support for "in" and "new" operators in templates
- misc: export the validate function
- app: add setting to warn if no static props object
- add static App.registerTemplate and update Portal to use it
- add basic infrastructure to buid owl-runtime without compiler

closes odoo/odoo#92599

X-original-commit: 7fc0cc7c3f1c770dd80e8c3f3316c249d0708fe4
Related: odoo/enterprise#27916
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-01 11:02:40 +02:00
Achraf (abz) daec4e6694 [IMP] web: Update Luxon to 2.4.0 version
closes odoo/odoo#92036

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-24 09:41:31 +02:00
Achraf (abz) eb9b28b2f8 [FIX] web: Allow user to display demo data in Vietnamese
Install the CRM app and the Vietnamese locale
Go to the CRM App > Reporting > Activities
Switch to Vietnamese (User icon > Preferences > Language)
The following error will appear :

```
UncaughtPromiseError > TypeError
Uncaught Promise > Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
    at parseDigits (http://localhost:8069/web/assets/debug/web.assets_backend.js:32038:31) (/web/static/lib/luxon/luxon.js:5117)
    at Object.deser (http://localhost:8069/web/assets/debug/web.assets_backend.js:32084:21) (/web/static/lib/luxon/luxon.js:5163)
    at match (http://localhost:8069/web/assets/debug/web.assets_backend.js:32423:37) (/web/static/lib/luxon/luxon.js:5502)
    at explainFromTokens (http://localhost:8069/web/assets/debug/web.assets_backend.js:32591:20) (/web/static/lib/luxon/luxon.js:5670)
    at parseFromTokens (http://localhost:8069/web/assets/debug/web.assets_backend.js:32614:30) (/web/static/lib/luxon/luxon.js:5693)
    at Function.fromFormat (http://localhost:8069/web/assets/debug/web.assets_backend.js:33592:30) (/web/static/lib/luxon/luxon.js:6671)
    at parseDateTime (http://localhost:8069/web/assets/debug/web.assets_backend.js:5814:32) (/web/static/src/core/l10n/dates.js:282)
    at parseDate (http://localhost:8069/web/assets/debug/web.assets_backend.js:5743:12) (/web/static/src/core/l10n/dates.js:211)
    at http://localhost:8069/web/assets/debug/web.assets_backend.js:20162:28 (/web/static/src/views/helpers/sample_server.js:460)
    at http://localhost:8069/web/assets/debug/web.assets_backend.js:10968:19 (/web/static/src/core/utils/arrays.js:96)
```

This is a issue with luxon
Issue: https://github.com/moment/luxon/issues/1169
Luxon update (2.4.0): https://github.com/moment/luxon/releases/tag/2.4.0
Fix: https://github.com/moment/luxon/pull/1194

PR to update luxon to 2.4.0 in master: https://github.com/odoo/odoo/pull/92036

closes odoo/odoo#92109

X-original-commit: 354433e7ba5b5f81f83368e497a8bed5059c91d5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2022-05-23 22:25:53 +02:00
Nicolas Bayet 3c14a3810e [FIX] mass_mailing: traceback when discarding while a popover is open
task-2810559

closes odoo/odoo#90697

X-original-commit: dc30885de4717bc1ead0251a65d7b07fef138c84
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-06 12:27:49 +02:00
Hubert Van de Walle (huvw) 34fa3126bd [FIX] web: Add Mongolian moment locale
Steps to follow:

  - Switch the current lang to mongolian
  - Go to a list view
  - Add a custom filter on a date type field
  -> locale() locale mn-MN is not loaded from moment locales!

Cause of the issue

  - moment.js tries to use the mongalian locale but it is not present

Solution

  Add the mongolian locale (from moment 2.29.2)

opw-2829233

closes odoo/odoo#90704

X-original-commit: 179a4b2f31d8e2e0e2be308917725a05c5b78058
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-05-06 09:38:11 +02:00
Xavier Morel f0fe59dcf7 [FIX] web/lib: backport jquery bugfixes
opw-2793379

closes odoo/odoo#90463

X-original-commit: 684e3fc983e91168dfaef8536fcd1f71ce7f7fdc
2022-05-04 00:05:02 +02:00
Xavier Morel 9ac8050de8 [REV] web/lib: Revert: backport jquery bugfixes
This reverts commit 0dd7c78b06726543825008a48d3dc004d2af4557.

X-original-commit: b50cd480d3f40ab084689587e6cbed311c09fb2f
Part-of: odoo/odoo#90463
2022-05-04 00:05:01 +02:00
Samuel Degueldre 03763da5bf [IMP] web: update owl to version 2.0.0-beta-7
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.0-beta-7

closes odoo/odoo#89937

X-original-commit: b0a807ff5ea36b08ec027ac19ac6d0b9ee360ab8
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-04-28 08:02:05 +02:00
Géry Debongnie 0111b77aac [FIX] web: update owl to last version
This commit includes a fix in the way Owl schedule renderings:
https://github.com/odoo/owl/pull/1176/commits

closes odoo/odoo#89034

X-original-commit: 497c754bab4629deb517b7b7995b06d55e41ab2f
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-04-19 16:40:10 +02:00
Géry Debongnie d82003382f [IMP] web: update owl to last version
This owl update is significant: it introduces a change in the way
components are rendered: now, child components check if there is a
current rendering somewhere in their ancestors. If this is the case, the
rendering will be delayed.  This prevents lots of issues where a
child components may be in some kind of corrupted state after some state
changes.

closes odoo/odoo#88572

X-original-commit: 93710d082bf860d0ea576fe99db9506af9bb42b0
Related: odoo/enterprise#26135
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-04-12 17:42:08 +02:00
Samuel Degueldre d2f8eb2b6b [IMP] web: update underscorejs to v1.13.2
closes odoo/odoo#86875

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-22 21:20:55 +01:00
Xavier Morel 8045d656c8 [FW][FIX] web/lib: backport jquery bugfixes
opw-2793379

closes odoo/odoo#86416

X-original-commit: 0dd7c78b06726543825008a48d3dc004d2af4557
2022-03-15 07:56:28 +01:00
dht-odoo 74fa91e0b3 [IMP] web: open external links (from PDF viewer) in new tab
Currently when we click on external links from a PDF opened in our
PDF viewer, you are redirected to the link, means you are leaving
the record which is not ideal.

With this commit, external links in PDF document will be opened in
new tab so that the opened record is not lost. For that we need to
change the default option of the pdfjs lib, because we cannot pass
this parameter in iframe (link of the documentation is available in
task pad). For that, we changed the value of 'externalLinkTarget'
from 0 (which sets target to NONE) to 2 (which sets target to BLANK)
in 'getDefaultPreferences' function.

taskID-2752002

closes odoo/odoo#84594

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-14 17:28:08 +00:00
Samuel Degueldre 432ecd975d [IMP] web: update owl to version 2.0.0-beta.3
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.0-beta.3

closes odoo/odoo#86019

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-03-08 14:59:11 +00:00
Géry Debongnie 816e6ce374 [REM] web: remove es6 promise polyfill
Since Odoo now accepts ES2019 code anyway, I think that this polyfill
can safely be removed, to reduce assets size.

closes odoo/odoo#85800

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-03-04 10:08:45 +00:00
Géry Debongnie ff7dc5ae8a [IMP] web: update owl to last version
closes odoo/odoo#85773

Changelog: https://github.com/odoo/owl/releases/tag/v2.0.0-beta.2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-03 17:13:45 +00:00
Aaron Bohy 36bd5b1699 [IMP] web: allow to access wowl services in legacy
This commit introduces the "useWowlService" hook. This hook allows
Owl components that use the legacy env (not the one of the
webclient for instance, typically called the "wowl" env) to access
services from the wowl env. Its API is the same as the classical
"useService" hook.

closes odoo/odoo#85769

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-03 16:18:03 +00:00
stefanorigano (SRI) 28f910f5be [REF] *: odoo_ui_icons
Following new policies in terms of product design-language, this commit
will partially revert 546477d reducing the number of `oi` icons.

It will also improve rendering when icons are rendered at our default
font-size (13px), avoiding blur effects when icons use thin lines.

Since fontAwesome will coexists with `oi` longer than expected, the
commit will also review size utility-classes in order to get consistent
result when used in conjunction with fa's ones (notably `fa-lg`).

Part-of: odoo/odoo#85651
2022-03-03 14:19:44 +00:00
Géry Debongnie 8c266b24c9 [IMP] web: update owl to last version
closes odoo/odoo#85671

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-02 15:18:52 +00:00
Géry Debongnie f96c88ee1a [IMP] web: update owl to version 2.0.0 with fine grained reactivity
Changelog : https://github.com/odoo/owl/blob/7845304b7e9cca465ec94af6b1b5272dadc70891/CHANGELOG.md

Part-of: odoo/odoo#84314
2022-02-25 12:35:43 +00:00
Géry Debongnie 649c037ab0 [IMP] web: update owl to last version
closes odoo/odoo#85197

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-23 13:58:00 +00:00
Bruno Boi 78f85f2725 [FIX] web: repair some keynav in dropdowns
ENCOUNTERED ISSUE:
Unable to close a dropdown with ESC when the focus has been given
to a select element inside the dropdown.

TO REPRODUCE:
i.e. in the searchpanel, go to "FilterMenu > Add Custom Filter" and
open the field select element.
Press ESC once: the field select element closes just fine.
Press ESC a 2nd time: we expect the dropdown to close but nothing occur.

REASON EXPLANATION:
Since 84715436d our Dropdown component uses the 'dropdown-menu'
bootstrap class.
But under some conditions bootstrap stops the keydown events propagation
when the event.target matches the query selector '.dropdown-menu'.

IMPLEMENTED FIX:
This commit refines this selector directly inside the bootstrap library.
This is admittedly a bad practice but:
- this modification is trivial and sensible
- the modified selector is only used locally
  in the bootstrap's 'dropdown.js' file
- the added test should prevent the lost of
  this customization in the future

task-2764821

Part-of: odoo/odoo#84969
2022-02-21 20:11:54 +00:00
Mathieu Duckerts-Antoine 3e2229db20 [FIX] web: flickering in graph view
Chart.js did badly compute the graph canvas container height (width) by
using clientHeight (resp. clientWidth) that may be rounded up by the
browser. This leads to the appearence of a useless scrollbar in the
graph view and makes it flicker on some update.

closes odoo/odoo#84476

X-original-commit: 6bceae94619da9f4943cbc1e58844fdbe0215802
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-14 07:58:52 +00:00
Géry Debongnie 966abc39b5 [REF] web: update owl to version 2.0.0
Changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md
Part-of: odoo/odoo#80156
2022-02-10 07:46:12 +00:00
stefanorigano (SRI) 546477dafa [ADD] web: .oi, odoo ui icons
This commit introduces our own icons meant to be extended over time and
to coexist with FontAwesome 4.7.

The goal is to provide a wider range of icons specifically made for our
UI and cover FontAwesome's lack of iconography for specific businesses
and functionalities.

Classes' names are available in our documentation website and the SVG
source files can be found in our `design-assets` repo.

This new bundle mirrors fontAwesome architecture; icons are rendered
applying classes to standard HTML flow-tags (normally an `<i>`), eg:

`<i class="oi oi-odoo"/>`

This implementation applies size and alignment rules directly to the
`:before` pseudo-element rather than to the class itself. The aim is to
prevent misalignment when icon classes are applied to buttons and other
UI elements, eg:

`<button class="btn btn-success oi oi-arrow--right"/>`

Note: Despite being technically feasible, this approach is highly
discouraged and should be avoided.

This commit also introduces utility-classes specifically made for
our UI. In detail:

- Fours sizes: '.oi-small', '.oi-normal', '.oi-large', '.oi-larger'

  Relative to the parent font-size, these classes cover a range from
  `0.8em` to `1.77em`. Each size has been designed to match our default
  text-fonts in the attempt to compensate font-icons common alignment
  issues (https://css-tricks.com/icon-fonts-vs-svg/#aa-positioning ).

- Responsive classes: `.oi-[screen]-[icon_size]`

  Responsive classes mirror Bootstrap ones and can be combined to
  achieve different size results at specific resolutions, eg:

  `<i class="oi oi-studio oi-larger oi-md-normal oi-lg-small"/>`

- Fixed width: '.oi-fw'

  Mirrors FontAwesome 'fa-fw' by setting icons at a fixed width.
  Our implementation adapts according to size and responsive classes.

- Animations: '.oi-spin', '.oi-pulse'

  Mirrors FontAwesome default animations.

This commit is part of v16 overall restyle (task-2704984).

enterprise: https://github.com/odoo/enterprise/pull/23848
task-2745275

Part-of: odoo/odoo#83501
2022-02-08 12:05:55 +00:00
stefanorigano (SRI) 0f64e506f2 [MOV] web, * : move font-awesome library in an editable location
This commit "forks" fontAwesome into `src/libs` in order to allow
further customization.
Part of v16 overall restyle (task-2704984).

task-2745275

Part-of: odoo/odoo#83501
2022-02-08 12:05:54 +00:00
stefanorigano (SRI) 4a5dbf6a57 [FIX] web, *: float utility-classes
'pull-[left/right]' classes are discontinued since Bootstrap v3 [1].
The reason why we never noticed is that we were unknowingly
relying on fontAwesome utility classes that are basically the same.

Since v3 we were supposed to use 'float-[left/right]' classes [2], but
these classes will be renamed again in v5 with 'float-[start/end]'[3].

This commit introduces "v5 ready" utility-classes and replaces v2 legacy
occurrences across the UI.
These classes definitions can be safely removed when v5 migration will
be completed.

Notes:
- this commit will *not* adapt frontend occurrences since its CSS
  already relies on a "migration table" [4]. 
- this commit will *not* adapt the few v3 'float-[left/right]'
  occurrences since are supposed to be handled in the v5 migration
  task (task-2704984).

This commit is part of v16 overall restyle (task-2704984).

enterprise: https://github.com/odoo/enterprise/pull/23848
task-2745275

[1] https://getbootstrap.com/docs/4.3/migration/#utilities
[2] https://getbootstrap.com/docs/4.3/utilities/float/#classes
[3] https://getbootstrap.com/docs/5.1/utilities/float/#overview
[4] https://github.com/odoo/odoo/blob/15.0/addons/website/static/src/scss/compatibility/bs3_for_12_0.scss#L49

Part-of: odoo/odoo#83501
2022-02-08 12:05:53 +00:00
Samuel Degueldre bfa7d28a8e [IMP] web: update owl to 1.4.10
Release notes: https://github.com/odoo/owl/releases/tag/v1.4.10

closes odoo/odoo#81048

X-original-commit: 462a58b9938f7601e9696c02d5fd4ded7c75cae0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2021-12-08 12:52:25 +00:00
Pierre Paridans b3dae8d669 [MOV] web: make ZXing barcode library available in community
This commit moves the ZXing library (used for QR/Barcode decoding) from
`web_enterprise` to `web` so it can be reused in other modules.

Change motivated by odoo/odoo#78204

closes odoo/odoo#80014

X-original-commit: 8c81e2f7c614c55247138278ffdf914e2866ec41
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-18 12:27:48 +00:00
Géry Debongnie 2cf87ea02f [IMP] web: update owl to 1.4.8
Release notes: https://github.com/odoo/owl/releases/tag/v1.4.8

closes odoo/odoo#79337

X-original-commit: bfbd0d956f3a7a22a22dfb4c466b7a6f0a916a7d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-11-03 19:00:46 +00:00
Bruno Boi 6fe52c9012 [FIX] web: adjust FullCalendar for luxon v2
See preceding commit

closes odoo/odoo#78797

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-22 09:52:44 +00:00
Bruno Boi d2cdcd9058 [IMP] web: update luxon from 1.25.0 to 2.0.2
See [upgrade guide](https://moment.github.io/luxon/#/upgrading?id=_1x-to-20)

Part-of: odoo/odoo#78797
2021-10-22 09:52:43 +00:00
Géry Debongnie 04ab67f1d2 [IMP] web: update owl from 1.4.6 to 1.4.7
Release notes:
https://github.com/odoo/owl/releases/tag/v1.4.7

closes odoo/odoo#78661

Fix: memory leak in some templates
X-original-commit: b1cb78169201159a0f103e6e41bb6d9ba99b074c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-19 18:35:41 +00:00
Géry Debongnie 6d67d02ece [IMP] web: update owl from 1.4.4 to 1.4.6
Release notes:

https://github.com/odoo/owl/releases/tag/v1.4.6

- fix: crash in component render (in rare cases)
- fix: build system now target ES2017 instead of ESNext
- fix: remove useless log in prod mode

https://github.com/odoo/owl/releases/tag/v1.4.5

- qweb: expose translatable attributes
- ci/tests: update jest/rollup
- doc: clarify tutorial
- doc: update readme, add nice badges

closes odoo/odoo#77835

X-original-commit: aa2cfb63932d28821a4a333d5162827392bf3366
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-05 14:16:54 +00:00
Gorash dc1e9e6b4f [FIX] web: ace mode-qweb should highlight the groups odoo attribute
Issue: the regexp does not parse the dot in groups.
For example: `groups="base.group"` is not parsed as odoo/qweb attribute

Part-of: odoo/odoo#74712
2021-09-08 10:21:42 +00:00
Xavier Morel 972b6bc9d1 [IMP] web: don't check for bad dom after test on failure
Currently, if a test fails there's very high chances the DOM will not
be clean, because qunit doesn't have good cleanup APIs. This means a
test failure will always be prefixed by a dump of the page DOM which
is just confusing and makes it hard to find the actual error.

This change updates the OdooAfterTestHook handler to:

* Receive the `Test` itself, instead of adding more information to the
  synthetic object it currently receives.
* Only show the leftover DOM if the test otherwise succeeded.
* Do the entire reporting via `pushFailure`, rather than having
  duplication between an explicit `console.error` and a test failure.
* Update the QUnit.log handler to
  - not show `undefined`
  - try to improve readability by removing the bracketing and quoting

closes odoo/odoo#75951

Forward-port-of: #75939
X-original-commit: 8bceac8032f48ae77e8a2c0c038f3bc26489e0ac
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-06 08:21:42 +00:00
Géry Debongnie 07e163727b [IMP] web: update owl from 1.4.3 to 1.4.4
Github release: https://github.com/odoo/owl/releases/tag/v1.4.4

Release notes:

- fix: overlapping multi-class in t-att-class

closes odoo/odoo#75934

X-original-commit: 085b971b0b1317317fa88116613bb2740233d241
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-09-03 14:30:51 +00:00