Commit Graph
14437 Commits
Author SHA1 Message Date
Aaron Bohy ff6e89052d [REF] web,*: regroup custom hooks in core/utils/hooks
*base_automation,iap,im_livechat,point_of_sale

This commit introduces a new file in core/utils: hooks.js
This file contains custom hooks (useEffect, useService, useBus...).

The useHotkey hook is tightly related to hotkeys, so it has been
moved to core/hotkeys.

closes odoo/odoo#74535

Related: odoo/enterprise#20003
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-02 11:13:52 +00:00
Samuel Degueldre 5ffdd92034 [FIX] web: make polling restart correctly when server is killed
Previously, when killing the server, the longpolling bus stopped but
didn't start polling again after a few seconds, this was caused by the
fact that ConnectionLostError wasn't treated like a legacy error and
remapped to an object with a message, meaning it didn't trigger
guardedCatch callbacks.

Since ConnectionLostErrors should be handled much the same way as
RPCError when interacting with legacy code this commit simply adds
ConnectionLostError in the same places we already have RPCError during
error handling of legacy errors, but delegates behaviour to the new
lostConnectionHandler when appropriate.

closes odoo/odoo#74530

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-02 11:45:55 +00:00
Lucas Perais (lpe) 70353a2063 [REF] web: action_service: dialog is null when absent
Before this commit, the current dialog (in the action service's state) was either an empty object
when there was no dialog, and a filled object when the dialog was present.

After this commit, when there is no dialog, the dialog state is null.

closes odoo/odoo#74442

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-02 07:58:09 +00:00
Lucas Perais (lpe) 83eb9f9ebd [FIX] web: action_service: onClose callback can execute history-back
Have an action in the breadcrumb (A)

Do an action (B) that has a button which spawns a dialog with a onClose callback executing an`history-back` event.
This may be useful when the action (B) acts as a selection buffer between (A) and the dialog.
(e.g. stock_barcode: execute `stock_barcode_client_action` from a picking)

Before this commit, the history-back event just closed the dialog without going back to the action (A)
This was because the wrong condition was used to determine if the dialog was still alive or not.

After this commit, the action (A) is displayed when closing the dialog from any point.
2021-08-02 07:55:52 +00:00
Benjamin Vray 00025dd406 [FIX] web, web_editor: disable horizontal scroll when dragging snippet
This commit adds an option to disable horizontal scrolling in the
smoothScrollOnDrag feature options and use it when dragging and
dropping a snippet into the editor to prevent the wrapwrap from
scrolling horizontally when an element overflow the page (e.g. an
animated element).

task-2215118

closes odoo/odoo#74518

X-original-commit: fdbc109780f336c4b7dcac31585beaad682e029a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 18:18:35 +00:00
Benjamin Vray da22414233 [FIX] website, *: prevent bottom fixed elements from hiding buttons
*: web, website_livechat, website_sale_comparison

Before this commit, bottom fixed elements (e.g. the livechat button)
hid the buttons to go to the next step in website sale when these
buttons are located at the bottom of the page, on some screen sizes.

After this commit,

- A bottom fixed element is hidden if this element hides a button at
the bottom of the page.

- Bottom fixed elements are hidden if a modal is open
to prevent it to hide buttons or any important part of the modal.

task-2501400

closes odoo/odoo#74515

X-original-commit: a851db9495fe9d8c1951f218a71e4d4a427cf96d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 17:24:48 +00:00
Sébastien Theys 810d5fd8aa [IMP] mail, im_livechat: add new UI for inviting members on channels
Opportunity is taken to clean the various follow/join/invite methods into only
one `add_members` method.

Part of task-2360169

closes odoo/odoo#74425

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-07-30 15:52:33 +00:00
qsm-odoo f14bbf1bdc [REF] web, *: move cookie utils out of legacy core utils
*: im_livechat

Cookie utils will be required on the frontend side but before the lazy
loading. This commit splits them out of default utils to achieve that.

Note: kept as "legacy" utils anyway, we'll handle that when the time is
right...

Part of https://github.com/odoo/odoo/pull/67140
task-2381049
2021-07-30 12:52:30 +00:00
Samuel Degueldre 4629caa530 [FIX] web: remove expensive @extend rules
These rules cause the scss compilation to increase dramatically in both
time and volume of the compiled file (for assets backend with no modules

closes odoo/odoo#74480

Installed: 1s -> 3s, 900kB -> 1.5MB)
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 11:10:07 +00:00
Simon Genin (ges) 7719f39e68 [FIX] web: fix readonly mode for url widget
The readonly would not clear the old content when new content was put
through an onchange.

closes odoo/odoo#74476

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-30 10:26:06 +00:00
Benjamin Vray 81f0f0840c [IMP] website_sale, *: review prices to be more realistic
*: product, purchase, purchase_stock, sale, sale_stock, web

PR-69971

task-2501400

closes odoo/odoo#69971

Related: odoo/enterprise#19974
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 10:39:44 +00:00
Francois (fge) bfa2d9c205 [IMP] web: refactor Command palette
The purpose of this commit is to make the palette command customizable.

From now, it will be possible to add spaceNames to modify the commands
displayed in the command palette.
For example, if I add the spaceName '@' and associate a provide function
with it, then when I type "@" in the search bar of the command palette,
the commands generated by provide will be displayed.

const commandProviderRegistry = registry.category("command_provider");
commandProviderRegistry.add("example", {
	nameSpace: "@" ,
    provide: (env, options = {}) => {
        return [{name: "myCommand", action: () => ()}]
    },
});

It will be possible to define several provide functions for the same
namespace. This will make it easy to add new commands when installing
a new addon.

Now it is possible to define commands that modify the state of the
command palette. This allows a command to change the placeholder
and commands displayed in the command palette.

closes odoo/odoo#73750

Related: odoo/enterprise#19970
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 08:26:09 +00:00
Francois (fge) 235fc69280 [IMP] web: replace fuzzy lib 2021-07-30 07:27:02 +00:00
Samuel Degueldre 4c7ef96974 [REF] web: refactor debug menu to use context in env instead of service
This makes the debug menu more natural to use, and makes the difference
between the "in-dialog" and "out-of-dialog" debug contexts explicit.

closes odoo/odoo#74346

Related: odoo/enterprise#19967
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 06:01:42 +00:00
Andrea Grazioso (agr-odoo) 2c19d865f9 [FIX] web: fix property assignment in pivot view
Sales > Reporting > Sales
Select the measure "Customer (count)"

TypeError: Cannot add property group_operator, object is not extensible

As the object is immutable we need to workaround the assignment.
The previous fix 35967fabd54f596fa75fb2db7fbb1cfc5d7c8da9
will be moved in the `documents_spreadsheet` code

opw-2606424

closes odoo/odoo#74328

X-original-commit: 865d0f5c4e9e14cbd5ed494f8c9dc75b6a82a78f
Related: odoo/enterprise#19910
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-27 15:52:03 +00:00
Sergey Shebanin 3a98a7ebc7 [IMP] hotkey_service prefer physical keys for non-latin keyboard layout
closes odoo/odoo#74212

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-26 10:43:15 +00:00
Mohammed Shekha 9aab080c1c [IMP] web: remove click event from attachment_image
With this commit: we remove click event from attachment_image widget, this is
specifically done so that when user clicks on kanban cover image kanban record
is opened, actually kanban record global click check if any of the child has
click event then it does not open on click.

task-2524022

closes odoo/odoo#74383

X-original-commit: a46b9ac37a0121102ddab44eca5ba6d6be82cb80
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-28 16:57:42 +00:00
Gorash 7d0d090ea5 [FIX] web: avoid a scrollbar when a carousel is added in pages
On Chrome, the browser displayed an horizontal scrollbar because the
sr-only item inside the 'next' arrow was positioned absolutely, outside
of the arrow, and thus outside of the window. This happened for the
website carousel snippet when added in pages for instance.

opw-2585526

closes odoo/odoo#74334

X-original-commit: c29060c80e987edcfbeeaa7824540583de88f8ed
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-27 16:44:45 +00:00
Jeremy Kersten 1e325c6970 [IMP] web: redify runbot in case of wrong xpath qweb2 2021-07-27 07:45:57 +00:00
Mohammed Shekha 7fbe05cdd6 [FIX] web: prevent no content helper on delete/archive list records
before this commit: when deleting or archiving or unarchive all records of last
page in listview user is displayed with NoContentHelper while we still have
other records in previous page, user should be moved to previous page if all
records of last page are deleted.

after this commit: if user deletes or archives or unarchives all records of
last page in list view then user is moved to previous page.

task-2446911

closes odoo/odoo#74091

X-original-commit: cead08fe6876239d1260b40948fcd74069496a2c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-27 05:16:38 +00:00
Hardik Prajapati 6b90c0004d [FIX] web: resize list in form view overflows
Currently, When the One2many list contains a large amount of fields and the
user clicks or resizes the header, list takes table width as its initial width
and because of this list to overflows outside of the form view.
Issue raised after commit: d58edef12a

after this commit, clicking or resizing the list header does not impact the
width of the list.

TaskID-2388582

closes odoo/odoo#74277

X-original-commit: a145e1242118d3e539790327221486e1bd94e59a
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-26 17:44:29 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Mohammed Shekha 2e818e7af9 [IMP] web: display issue with fixed table layout list in group
Before this commit: When o2m inside inner group and it has record then
sometime group is not displayed side by side instead second group comes
below first group.

After this commit: If o2m inside inner group and it has record, it will
always displayed beside first group, the issue was occuring due to
o2m list table layout which is fixed and due to which group width
increased and second group comes below first group, here we are setting
max-width to listview so that it never increase width than max-width.

task-2571376

closes odoo/odoo#72700

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-06-24 12:07:23 +00:00
Samuel Degueldre 1eeab1e418 [REF] web: remove legacy rainbowman
The frontend code was still using the legacy RainbowMan, with the wowl
webclient, we rewrote this RainbowMan and started using that one
instead, but because the frontend code had no access to the wowl
environment, the legacy version was still used in the frontend. Since
the frontend now has access to the wowl environment, the old code can be
removed and the calls can go through the new effect service.

closes odoo/odoo#74148

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-23 12:14:10 +00:00
Guillaume (guva) b2f24c3ea0 [FIX] web : dark purple color doesn't work
Step to reproduce

- go to planning app
- configuration > roles
- set the color of a role to dark purple
- schedule > by role

The dark purple is not set, instead of that, #3daec3 is displayed.

opw-2601898

closes odoo/odoo#74185

X-original-commit: ee38f8e393e937c5694e6b75cd05b8a35d4f1624
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
2021-07-23 16:23:29 +00:00
Michael Mattiello (mcm) 0864034f45 [FIX] web: fix quick edit text selection test
Before this commit, it could happen that the test fails.
We may be waiting too long on the second click in the test and so
the form switches to edit mode too early.
Now, we don't await the click to keep sync.

closes odoo/odoo#74157

X-original-commit: 01708583777cf33e9b505a494fdc5cdb66db86b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-23 11:04:29 +00:00
Francois (fge) b3de6f43d5 [FIX] web: display commands in the palette command
This commit avoids displaying commands associated with the wrong active
element in the palette command.

closes odoo/odoo#74149

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-23 09:50:28 +00:00
stefanorigano (SRI) 7084223134 [FIX] web: form view's stat_button design, remove entries double border
odoo/odoo#73748
task-2604186
2021-07-15 08:27:54 +00:00
Leonardo Pavan Rocha f33f305807 [FIX] web: fixes reports not scrolling
task-2355704 introduced a bug which prevented scrolling in reports, instead of only in report preview.
This PR fixes this bug.

task-2586245

closes odoo/odoo#73496

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-09 12:59:09 +00:00
stefanorigano (SRI) 23fcc67a24 [FIX] web: adjust 'o_status' design
Solve an issue causing the background to be always 'bg-200' for Apps
that don't use bootstrap default 'bg-x' classes.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 05d9d3ff65 [FIX] web: review 'o_dropdown' component scss code
This commit will simplify css output removing @extend(s) that are not
strictly necessary.

Moreover it will remove a deprecated compound-selector extension (good
catch @xmo-odoo).

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 6ef27067f4 [FIX] web, mrp: remove old decoration classes occurrences
Custom text decoration classes have been dropped with d9a0877096
in favor bootstrap default ones.

This commit will adapt the list-view generation code ans some mrp
translations that were mistakenly omitted.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) f7efa256fb [FIX] web, calendar: many2many avatar-tags field alignment
Prior to this commit the avatar status element was touching the badge
border.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) b49cd9fa55 [FIX] web: pivot cp, add missing caret
task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 8a90d9288e [FIX] web: remove dropdown-menu minimum width
This line was initially introduced to handle legacy dropdowns
inconsistencies, but it's no longer necessary.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) a10089523f [FIX] web, account: review dashboard dropdown design
task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) beea3b1777 [FIX] web: solve inputs' caret inconsistencies
Before this commit input carets appeared different in color and size.
Moreover, since '$caret-width' was set using 'em' units, the caret was
sometimes cropped due to inconsistencies on how browsers handle decimal
border-width values.

This commit will uniform the way how input carets are achieved for
both versions and introduces caret's contextual variations (:focus /
required / invalid).

The caret color will now always matches the '--o-input-border-color' css
variable that changes according its the context.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 2955883b94 [REF] web: o_input border color
This commit will change how states' border-colors are achieved for both
versions, extending enterprise's focus/disabled/invalid behaviors to
community.

Rather than (re)define each time the border-color with different css
lines, we'll set it to be equal to the '--o-input-border-color' css
variable once.
Than we'll change the variable's value according to its context.

This approach allows to define contextual border-colors without creating
complex selector and without the need of applying '!important' rules on
nested inputs.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 4edfe4b45c [MOV] web, web_editor: move 'print-variable' mixin in utils.scss
Allows to use 'print-variable' mixin in any bundle.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 803c945084 [FIX] web, calendar: fields vertical misalignment
task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) 0fd07a82ca [FIX] web: datepicker, show box arrow + minor design adjustments
task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) a2ec00a231 [FIX] web: highlight '.active' dropdown entries on :focus/:hover
Previous to this commit our custom bg-color for '.active' dropdown
entries (transparent) was overriding the default :focus/:hover highlight
behavior.

This is normal in bootstrap default, 'cause the framework uses accent
colors (eg $primary) for .active' entries bg.
Since these colors are normally more catchy than the :focus/:hover
ones, we can assume that the behavior is intentional but it doesn't
match our design chooses.

This commit will reinforce :focus/:hover rules for '.active' entries too
, allowing keyboard navigation and making it clear to the user that an
'.active' entry may be eventually toggled.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) dfc0c15cfb [FIX] web: settings view, remove unnecessary gap
This gap was initially introduced to increase space between section but
was not triggered correctly and, ultimately, not strictly necessary.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) a2ee6b923c [FIX] web: correctly target 'o_dropdown_item' child
Partially revert 47acba560a removing rules defining '<a>' children as
exceptions. Having an element (either <a> or a <span>) wrapping the
entry content is indeed now considered the norm.

This commit will extend bootstrap 'dropdown-item' design to any
'o_dropdown_item' first-child rather than on element itself.

task-2579123
2021-07-23 06:54:18 +00:00
Mohammed Shekha 4e40979099 [IMP] web: o_form_label_empty on standalone label
Before this commit: when standalone label is rendered in form view class
o_form_label_empty is not added due to which label text is not muted.

After this commit: when standalone label is rendered, label is sometime
rendered before field widget is rendered due to which o_form_label_empty class
is not added to label, with this commit we postprocess labels so that
o_form_label_empty is added on all field labels.

Also with commit, signature widget's isSet method will return true if value is
set in signature widget, this will make label of signature widget muted if it
is empty and form view mode is readonly.

task-2523197

closes odoo/odoo#71322

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-07 08:29:28 +00:00
Sergey Shebanin 4440484c80 [IMP] hotkey_service add Delete & Tab to list of allowed keys
closes odoo/odoo#73555

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-12 10:25:26 +00:00
Samuel Degueldre cfe079221c [FIX] web, web_editor: restore media upload progress toast
In odoo/odoo#72675 the new services were made available in the frontend,
and calls to the legacy notification services were redirected to the new
notification service. However, some of the behaviour of the legacy
notification service was not replicated in the new one, like the ability
to pass an HTML element to use inside the notification.

While html content can be passed, it is cloned, meaning that the DOM of
the element cannot be manipulated by the caller, which is what was being
done to show progress during media upload.

Although the upload progress toast looks like a notification, it's
hardly a standard notification and adds a lot of behaviour, because
manipulating DOM directly when it is managed by owl cannot be done
safely, it has been decided to simply make it its own widget separate
from the notification service, which can manipulate its own DOM freely.

task-2607393

closes odoo/odoo#74027

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-20 13:13:03 +00:00
Mohammed Shekha 33c2615359 [IMP] web: remaining_days widget editable in edit mode
Before this commit: remaining_days widget is not editable and it just shows
information based on value like, Today, Yesterday, Tommorrow etc, when we
change mode to edit it should have date/datetime picker so that user can change
value of the widget.

After this commit: remaining_days widget will display date/datetime picker in
edit mode and in readonly mode it will display delta between the value of the
field and today, it will also support edition of date/datetime value in multi
edit mode.

task-2507961

closes odoo/odoo#70578

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-16 07:18:16 +00:00
Pierre Masereel 3e7c9c67e8 [FIX] web: hexadecimal color in 8 digits not supported
Some scss compilers are not supporting the colors written in hexadecimal
with 8 digits.

So to keep the the color and transparency, we have re-written the color
in rgba.

Issue introduced in: https://github.com/odoo/odoo/commit/a1c983250e9547c383ef677fb411b0bc589efa89

closes odoo/odoo#74112

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-22 12:00:56 +00:00
Barad Mahendra e4967653be [FIX] web: fix the display of the time in year view popover
Currently, the time in popover of the year view does not appear
with the title due to record.allday is undefined instead of false

So in this commit, check if record.allday is not exist then display
the time infront of the title instead of after the title.

Related enterprise PR: https://github.com/odoo/enterprise/pull/19134

closes odoo/odoo#72440

Closes: #72440
Taskid: 2502339
Related: odoo/enterprise#19134
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-21 04:44:28 +00:00