*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.
closesodoo/odoo#74535
Related: odoo/enterprise#20003
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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.
closesodoo/odoo#74530
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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.
closesodoo/odoo#74442
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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.
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
closesodoo/odoo#74518
X-original-commit: fdbc109780f336c4b7dcac31585beaad682e029a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: 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
closesodoo/odoo#74515
X-original-commit: a851db9495fe9d8c1951f218a71e4d4a427cf96d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Opportunity is taken to clean the various follow/join/invite methods into only
one `add_members` method.
Part of task-2360169
closesodoo/odoo#74425
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: 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
These rules cause the scss compilation to increase dramatically in both
time and volume of the compiled file (for assets backend with no modules
closesodoo/odoo#74480
Installed: 1s -> 3s, 900kB -> 1.5MB)
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The readonly would not clear the old content when new content was put
through an onchange.
closesodoo/odoo#74476
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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.
closesodoo/odoo#73750
Related: odoo/enterprise#19970
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This makes the debug menu more natural to use, and makes the difference
between the "in-dialog" and "out-of-dialog" debug contexts explicit.
closesodoo/odoo#74346
Related: odoo/enterprise#19967
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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
closesodoo/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>
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
closesodoo/odoo#74383
X-original-commit: a46b9ac37a0121102ddab44eca5ba6d6be82cb80
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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
closesodoo/odoo#74334
X-original-commit: c29060c80e987edcfbeeaa7824540583de88f8ed
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#74091
X-original-commit: cead08fe6876239d1260b40948fcd74069496a2c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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
closesodoo/odoo#74277
X-original-commit: a145e1242118d3e539790327221486e1bd94e59a
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
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
closesodoo/odoo#72700
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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.
closesodoo/odoo#74148
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/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>
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.
closesodoo/odoo#74157
X-original-commit: 01708583777cf33e9b505a494fdc5cdb66db86b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit avoids displaying commands associated with the wrong active
element in the palette command.
closesodoo/odoo#74149
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
task-2355704 introduced a bug which prevented scrolling in reports, instead of only in report preview.
This PR fixes this bug.
task-2586245
closesodoo/odoo#73496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
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
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
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
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
This gap was initially introduced to increase space between section but
was not triggered correctly and, ultimately, not strictly necessary.
task-2579123
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
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
closesodoo/odoo#71322
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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
closesodoo/odoo#74027
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
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
closesodoo/odoo#70578
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
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>