The date/datetime values produced in the domain selector for
date/datetime fields are not localized (like they are in the date
picker) when presented in :
- the domain selector in readonly mode
- the facets edited/created from the domain selector dialog
Here we make sure that the localization parameters are used when we
display date/datetime values in the domain descriptions.
closesodoo/odoo#141304
X-original-commit: bd1f5dc017a2549889002d5ff5382cbd3be6580b
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Steps to reproduce:
- Create a form view with a `div` with class `oe_button_box` and an
invisible modifier inside a `sheet` tag
- Open the form view
=> The invisible modifier is not applied on the button box.
Since https://github.com/odoo/odoo/pull/116641, the invisible modifier
set on a button box inside a sheet tag is **replaced** by a condition
that check if the form is displayed in a dialog. This is not correct,
the invisible modifier should be **extended** with the dialog condition.
closesodoo/odoo#141259
X-original-commit: 570a1a9bf3e7c3012c516beb8850f320a6cc8f63
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
In many situations, when you click on a button, you want to disable all
the other buttons while it is running.
Currently, in each of these situations, we duplicate the same code that
disabled all the buttons and enabled them afterwards. Unfortunately, in
many cases, if the code executed crashes, the buttons are not enabled.
In this commit, we're going to create a helper so that we have a single
version of the code that correctly handles crashes. This helper will
disabled all the buttons, then execute the click code and enabled all the
buttons afterwards. If the code crashes, it will also enbaled them.
The problem has been reported for the Settings Form view:
When you edit this view and click save, if an error occurs in the save,
all the buttons remain disabled.
closesodoo/odoo#140938
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In a many2many_tags field with onchange and on a slow network, quickly
add or remove tags several times. Each call to update sends a command 6
(SET) based on the current state of the record (typically here,
the very initial state). For example, if there're 2 tags [1, 2] in the
relation and I add 3, a command 6 with ids [1, 2, 3] is sent. If I
quickly add 4 before the onchange returns, another command 6 with ids
[1, 2, 4] is sent. At the end, 3 would not have been added to the
relation.
With this commit, we don't use the command "set" anymore. Instead, we
use a combinaison of commands "link" and "unlink" to add and remove
records from the relation. This way, we don't need to know the current
state of the record, and we can be sure that the final state of the
relation is the one we expect.
Task-id 3522153
closesodoo/odoo#140644
Related: odoo/enterprise#49995
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce
==================
1. Open marketing automation and select any campaign.
2. Click 'edit' on activity or click 'add new activity'.
3. Select existing mail template and open it to edit the template.
4. Select template on mail body page and click fullscreen from snippet.
The activity modal dialog appear at top of everything.
Technical
=========
In prior version, the 'owl_dialog.js' file includes a 'display' function that
applies the 'o_inactive_modal' class to the inactive dialog, adjusting its
z-index. However in master, the commit https://github.com/odoo/odoo/commit/036307ba260ef1a08e80a14f7cffe1ef9a24021c removes the'owl_dialog.js'
file, resulting in the class no longer being applied.
After this commit
=================
The 'o_inactive_modal' class is applied based on the state 'data' to
position the dialog below the fullscreen editor.
Task-3512850
closesodoo/odoo#139165
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
Prior to this commit, "Add a Reaction/emoji" and "View Reactions"
buttons had the same icon, which was confusing.
This PR adapts the "Add a Reaction/emoji" icon to make it more
recognizable.
task-3577008
closesodoo/odoo#140481
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When a request to the server takes more than 3 seconds, the blockUI
then prevents the user from taking another action. For example, when
you want to apply several filters quickly, the blockUI appears and,
in the end, you may want to apply yet another filter.
In this commit, we remove the blockUI because we believe that blocking
the user makes little sense. This only makes sense when installing
a new application.
task-3279095
closesodoo/odoo#140042
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When discuss is not installed, hovering a facet in the searchbar makes
the cog overlap the icon/text.
This is due to the `o-bg-inherit` class which is set in the mail module.
Therefore if discuss is not installed, the SCSS for the background
doesn't exist.
This commit moves the `o-bg-inherit` as a new utility class `bg-inherit`
, allowing it to be used even if no apps are installed.
Therefore also renaming the occurences of `o-bg-inherit` into
`bg-inherit`.
task-3575837
closesodoo/odoo#140334
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In f0b7838f the event_barcode was moved from enterprise to community, so
the menu for the registration desk changed. As this menu was blacklisted
in the clickbot, it started to fail in the nightly tests.
While at it:
* remove useless and noisy log
* log when a menu is skipped instead of telling that it was tested
closesodoo/odoo#140805
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit fixes a contrast and readability issue on the active tab
within Settings on small devices.
Prior to this commit, an active tab on mobile view would use a primary
background, while nothing would be declared for its text color.
This would cause readability issue, with a dark text on a primary
background.
To avoid this kind of issue, we set a `text-bg-primary` class to our
button to ensure it gets readable, and also set a `shadow-none` to
prevent the `tip` of the tab to appear in mobile, since it would use
another color.
task-3580676
closesodoo/odoo#140751
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit, fix the issue that some tests fails on other month than
October, this occurs because the current date wasn't patched on the
tests.
Moreover, this commit removes the log "Clicking on: Control Panel menu",
this log is not very important, and can increase significantly the size
of the log.# with '#' will be ignored, and an empty message aborts the
commit.
closesodoo/odoo#140728
X-original-commit: 3538513c87098aab21bd2224fbf6a338ffd5b577
Related: odoo/enterprise#50046
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
The MacroEngine has a stop function that allows to completely
disable it. Before this commit, it correctly disconnected the
"main" mutation observer, but it didn't disconnect the mutation
observer for iframes.
In web_tour tests, we mock the MacroEngine to stop it at the end
of tests, but this didn't stop the iframe mutation observer.
This had an highly undesirable side-effect in tests: the qunit
suite stopped during mass_mailing tests, because the iframe
mutation observer detected a change which produced the log of
"test successful", which ended the whole suite. Some tests were
thus never run anymore (fortunately, we're only talking about a
few qunit modules).
closesodoo/odoo#141143
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
**Before this commit**
Open within a dialog a popover that has a child
using the useAutofocus hook.
As the dialog has become the UI active element,
and as the popover's element tree is a sibling
of the dialog element (since both use the overlay
service): the autofocus mechanism wanted by the
popover's child does not work at all.
**After this commit**
The popovers now can also become the UI active
element, leading to the above use case to work properly.
closesodoo/odoo#140885
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
**Good to know first**
The UI active element takership system is
directly bound to the focus trap mechanism.
**Before this commit**
If an element become the UI active element but has no
tabable elements in its tree, we force its tabindex
to the -1 value to make it programmatically focusable.
That way we ensure the focus is effectively trapped.
**After this commit**
The tabindex is no more forced at all.
Instead, if we detect that there are no tabable elements
inside the UI active element candidate, it simply does not
become the UI active element.
In other words, this commit kind of weakens the focus trap.
But this is perfectly fine for our use cases, i.e.:
- dialogs always have at least one focusable button (close, ok...)
- the website wysiwyg-adapter has a ton of focusable elements
**Why ?**
We need this change to permit other UI pieces to make use of
the active element takeover mechanism, i.e. popovers.
Part-of: odoo/odoo#140885
**Before this commit**
If a UI active element taker has its first or last
tabable element rendered conditionnaly, the focus trap mechanism will
not work properly.
**After this commit**
It works as intended.
Part-of: odoo/odoo#140885
This commit forces the color of all buttons in the header to have a
better-look consistency.
Steps to reproduce:
* Open Odoo on small screen
* Go to Sale
* Create a new SO
* Click on customer field to open the Kanban view => BUG
the clear button is not visible (enterprise)
closes odoo/odoo#141040
Forward-port-of: #50123
X-original-commit: aa748820d06ddd84465c404ce158e882307dbda6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Before this fix, a condition of the form (field_name, "in", expr) would
be "stringified" in such a way that expr would be wrapped in a list, e.g.
we would get by expressionFromTree the expression
field_name in [expr]
Here we prefer to keep expr as it is since we have no information on its
type at evaluation. That is we transform the above condition into
field_name in expr
closesodoo/odoo#140966
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
**Before this commit**
Open some popover then a dialog.
The popover appears in front on the dialog.
Examples:
- Calendar > Click an event (popover opens) > Open command palette
- Open a facet domain editor dialog in any app, then open any model
field selector popover and open the command palette
**After this commit**
Each first-level child of the overlay container
starts with the same z-index and with a value
that is greater than the higher value we can find
in the bootstrap z-index master list.
This solves the aforementioned overlaping issues.
closesodoo/odoo#140953
X-original-commit: 9682cfa174fb39ec9d9874951ea9ee2884058d96
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Steps:
- Install Field Service
- Open the Field Service module
- Click on the configuration
- Go to the Worksheet Template
- Now go to the kanban view
- In view, Click on dropdown menu of any card
Issue:
- In kanban view, when we are viewing in dropdown menu colors are not correctly
centered.
Fix:
- Added in kanban color picker mb-0 & ms-2 for margin space from bottom & left.
Task-3508241
closesodoo/odoo#140807
X-original-commit: 97e90710f5f2e300131df442bba833a5e7ece29e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit adds the "alt+u" shortcut to open the cog menu in order
to match with the behavior of the actions menu.
task-3560446
closesodoo/odoo#140798
X-original-commit: fbf245cb81453e1fedbfd4649a8284546da44ffb
Related: odoo/enterprise#50074
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit fixes an issue with the domain field where a traceback would
be launched when an invalid domain is received. It also changes how
invalid domains are displayed in foldable domain fields so that only the
content of the domain selector component is displayed in this case.
closesodoo/odoo#140719
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit changes the behavior of the domain field such that it
performs a quick validation of the domain after it has been edited in
the debug input. This solves an issue where the isValid state was not
properly updated after debug input edition.
Part-of: odoo/odoo#140719
After the calendar revamp, a button in the scale selector to hide/show the
weekend in the calendar view was not being rendered. This was caused by a
wrong rebase that removed the props that were supposed to be passed to the
ViewScaleSelector component. This commit fixes this, therefore bringing back
the feature.
task-3570053
Part-of: odoo/odoo#139736
The datetime picker's top and bottom padding is unnecessary in the
calendar's sidebar.
An extra margin is added below the filters because the sync buttons
were too close.
task-3570053
Part-of: odoo/odoo#139736
The class was added to make the event highlighted when the popover is
open, but this is buggy at the moment, better to remove until a better
fix can be made.
task-3570053
Part-of: odoo/odoo#139736
After https://github.com/odoo/odoo/pull/138670, the calendar view would start
breaking in tablet resolution. This was caused by a wrong media query that
was not being applied to tablets.
task-3570053
Part-of: odoo/odoo#139736
Currently the overflow-auto of the filters is in the wrong div, causing the
scrollbar to render on top of the attendees' names. This commit fixes this
issue by moving the overflow-auto to the correct div.
task-3570053
Part-of: odoo/odoo#139736
Currently the datetime picker computes a gap property in css for the rendered
titles, however since the display is not set as flex, the gap is not applied.
This commit adds the flex display so that the gap is applied.
task-3570053
Part-of: odoo/odoo#139736
*: mrp_subcontracting, project, test_website, web, web_editor,
website_slides
This commit removes jQueryUI autocomplete that was the last usage of
jQueryUI.
No longer usage of these features inside the codebase
task-3439226
Part-of: odoo/odoo#139209
Adapt the website industry selection autocomplete inside the
configurator to use the autocomplete owl component instead of jquery
autocomplete
task-3439226
Part-of: odoo/odoo#139209
*: web, website, website_form_project
Remove the jQuery UI Widget `urlautocomplete` by using made some
refactor to allow usage of the owl component.
task-3439226
Part-of: odoo/odoo#139209
Before this commit, the install prompt was half shifted out of screen.
After this commit, the install prompt is not shifted anymore.
closesodoo/odoo#140659
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Steps:
- Open Project
- Create New Project
- Select the blank new project and click on see examples below the stage.
- This also appears in the existing project where you want to add more stages.
- A Kanban Examples popup view will open.
Issue:
- A scrollbar appears on the bottom left due to the long name of the example.
Cause:
- Due to the overflow property, when the name is long, it will automatically
create a scrollbar, making it look weird.
Fix:
- Add overflow-x visible in notebook It will counterbalance the overflow-x: auto;
rule used in the general (aka. horizontal) use case, and force the overflowing
element to take the space it needs, adjusting the headers column's width accordingly.
closesodoo/odoo#140590
Task: 3422009
X-original-commit: 4fff4fbb308bf411603cfc239e9f651598d0de78
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*: account, hr_recruitment, project, lunch, mrp
By removing the absolute positioning on ".o_favorite" inside kanban
views, we allow it to align naturally with the rest of the elements,
thus removing the custom code that was needed for padding.
By doing so however the icon - which is now only visible on hovering the
card in the Project's kanban view - should remain visible at all times.
The behaviour would be the same as in other kanban views: an outlined
star when not active and a full yellow star when it is.
The margin on the kanban heading in the Manufacturing orders has been
removed to realign the top elements.
task-3462098
closesodoo/odoo#131559
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The clickbot test fails after October because of a hard coded month. It
needs to be refactored but let's skip it in emergency.
closesodoo/odoo#140641
X-original-commit: f9ec63dc3d865a24ec7da3f9389ce6b46fb66a83
Related: odoo/enterprise#49990
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit fixes an issue where the interior of the arrow of the
disabled `o_arrow_button` was darker on hover
task-3573542
closesodoo/odoo#140122
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
If one edits an input value in a dialog and click on the dialog header,
the blur event is prevented because the dialog is draggable and the
pointer down native behaviour is prevented by the draggable hook builder.
This can cause data losses or the dialog content to not be render correctly.
For instance, this happens with the debug input of the domain selector
dialog.
We fix that by triggering the blur event programatically.
closesodoo/odoo#140436
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
In views with a searchbar, we want the filters to be displayed
directly when they are activated, without waiting for the view to
be reloaded. This is to provide a direct feedback to the user.
Before this commit, this didn't work in grouped kanban view with
progressbar. The regression has been introduced by [1] which moves
the progressbar logic out of the model. With [1], the rendering of
the KanbanController waits for the progressbar data to be loaded
in onWillUpdateProps, thus delaying the rendering coming from the
WithSearch when a filter is toggled.
This commit applies the same logic as for the model: we do not wait
for the loading promise in onWillUpdateProps. That way, the
rendering coming from WithSearch is synchronous, but a reload is
initiated and another rendering will be scheduled by the Controller
itself when the data will be loaded.
This commit also adds a test for the model case, as it appears that
this wasn't tested.
[1] 58ca40b032closesodoo/odoo#139967
X-original-commit: 47cf6e326f5a795984bac2138b169503c3dd099c
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Purpose:
-------
The "StockMoveX2ManyField" custom field has given rise to a new need,
that of being able to edit a record in an x2many directly or from a dialog.
This is the first use case to require the ability to do both at the same time.
This particular use case highlighted a bug preventing a change from being saved.
How to reproduce:
- Go to a form view with an x2m using a custom widget
- Open an x2m record in dialog mode
- Close the dialog
- No changes have been made to the record, so the save button is not displayed
- Edit a field in the same record
Before this commit:
The save button is not visible
After this commit:
The save button is visible.
closesodoo/odoo#140298
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit removes useless function from legacy/utils.js and removes it
from several backend bundles. The file is moved in wysiwyg and frontend
bundles as it is still used in these bundles.
task id: 3439226
closesodoo/odoo#140260
Related: odoo/enterprise#49812
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit, cliking on a popover that was open inside another
popover closed both of them.
After this commit, the popovers are not closed. them will close only if
we click out of them and the popovers they opened.
closesodoo/odoo#140258
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Purpose:
--------
Before this commit, if you edit a char field with an onchange in
an x2many, the FormStatusIndicator buttons will flicker.
How to reproduce:
-----------------
- Go to a form view with an x2many field in list mode
- Type a char in the char field of a record
- The FormStatusIndicator buttons are visible
- Click outside the char field
- An onchange is triggered
Before this commit:
The FormStatusIndicator buttons will disappear until the onchange returns.
After this commit:
The FormStatusIndicator buttons remain visible.
closesodoo/odoo#140179
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
In this commit, we will remove "closestScrollable", "compensateScrollbar"
and the last usage of "scrollFixedOffset" outside of dom.js.
closesodoo/odoo#140181
Part-of-task: 3439226
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>