This commit removes the unnecessary duplicate of the 'o-input' class being present
in the template of the (Multi)RecordSelector components. As the RecordAutocomplete
component uses the Autocomplete component, which already set this classname on its
<input> node, the class was present twice in the DOM.
This could affect the style when trying to write a rule on .o_input since both elements
would get the style.
Now, only the input keep the class, which makes things easier and more predictable.
closesodoo/odoo#161934
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This commit fixes an issue caused by the way we use onInput props in Knowledge to
fetch articles depending the current search value. Since we start from an empty
string in the input again, it make no sense to display the choices previously
fetched with a search value no longer displayed in the UI. The only way to display
the correct items is to update the input value, then put an empty search to fetch
accordingly.
This is clearly an issue, when the onInput props is used to fetch the content of
the SelectMenu, depending of the search value. The UI obviously display an empty
search, and filter accordingly, but without fetching the items corresponding to
the empty search value.
A test was added as well to assert SelectMenu can be used for this purpose without
forgetting to call onInput again when clearing the search value in beforeOpen.
closesodoo/odoo#153072
X-original-commit: ca417f171b1bd2dd567beed7bc0e1fcaba6c8a4c
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes the style applied to the o_select_menu_sticky elements. Since the
fix from commit (1), the text cursor is shown when hovering those elements. This was
without considering the fact that this class is mainly used to display elements on
top of other elements of the component.
This includes usages with the bottomArea slot, that can be used with a DropdownItem.
Because of the changes from the commit previously named, the focused color was no longer
applied, and it was showing the wrong cursor when hovering.
1) 53466e152bb819524b2890866bea4cbdd9091275
X-original-commit: 8ecc6f2a960494f01a745f21a24c3cc57614ad86
Part-of: odoo/odoo#153072
Prior to this commit, some visual style of the SelectMenu component had
not been adapted since the latest Odoo redesign (named Milk). This made
some parts of the menu inappropriate with the current padding of the input,
and the border would not fit anymore, since the input is no longer linked
to the menu.
Also, the search input no longer had a pointer: text associated, but a
pointer instead, which seems wrong as the user can type in it.
Finally, some element were not visible correctly in dark mode.
This commit improves the overall look of the SelectMenu component when being
used with this design.
closesodoo/odoo#151276
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes the behavior of the SelectMenu component when an option
is being used with an empty string or a null value.
Let's suppose we have the following choices:
{ label: 'Empty', value: '' },
{ label: 'Full', value: 'full' }
Before this fix, when selecting 'Empty', the value would be selected in the
menu, but the toggler would still be empty, as if no value was selected.
Now, any value corresponding to a choice value can be selected.
A test has been added for each value supported (null and empty strings).
Part-of: odoo/odoo#151276
*: mail
This commit fixes the behavior of the notification to install the PWA.
The initial spec was not completely achieved, since the 'Dismiss' button,
using the fa-close icon was not present. See task-3275275.
Now, the button is present, and it can hide the notification and the user don't
need to interact with the installation prompt to dismiss it.
The fix also fixes the behavior of the notification when being used in
an incognito tab. The installPrompt service assumed the PWA could be
installed, since window.BeforeInstallPromptEvent is defined. But in an
incognito scenario, the event was never actually triggered, since the
feature is disabled by the browser.
This could finally create a UX issue if the app had been installed, and the
localStorage cleaned. The notification would appear, but wouldn't do anything
when clicking on the Install button since the event is no longer triggered by
the browser. Now, we rely on the trigger of the event exclusively, except on
Safari, where we rely on the installationState and the standalone display-mode.
Now, the service only set its state when the event has effectivelly been
triggered and the native prompt can be called. Since the UI relies on the
state from the service, the notification is no longer shown.
Tests have been adapted, to dispatch a custom event, allowing the service to be
initialized as if it was in a situation where the PWA can be installed effectively.
A new test have been added to verify the interaction with the close icon.
closesodoo/odoo#149961
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes an annoying issue when using Odoo on a tablet or a PC when using
the touch screen primarly. The virtual keyboard popped way too much when navigating
in between views and screens, since the focus is often set on inputs (mostly the
search bar with useAutofocus).
Steps to reproduce:
- on a Windows laptop or tablet with a touch screen, open any view
- the virtual keyboard appears
- you must touch out of the keyboard to use Odoo
To fix the useAutofocus hook, hasTouch is now being used instead of relying on the size
of the screen.
Autofocus test with isSmall has been adapted to specify that touch isn't modified, and
that the autofocus is still present. And another test has been added asserting the
behavior on a touch device.
In the form renderer, the autofocus set manually on the first element is now prevented as
well, reducing the popping effect of the keyboard when opening a view. A test has been
added as well.
task-3627697
closesodoo/odoo#148925
X-original-commit: 1f2ab6d5dda61a6aad6e0e9bd282195cdd990f15
Related: odoo/enterprise#54074
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
*: analytic, mass_mailing
This commit fixes the supportedOptions object in some fields. Instead of using
a 'supportedTypes' key when descbribing the type of fields that an option must use,
the 'availableTypes' key must be used. This was simply misspelled.
A help has also been added for the fold_field option, following the fix for task-3474817
closesodoo/odoo#143127
Related: odoo/enterprise#51241
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Since the StateSelectionField component handles the hotkey registration,
it was necessary to verify that an hotkey can effectively be added, instead
of trying to register to alt+undefined.
This issue happens when having more options in the selection field. Since the
code is written in a way each listed option should have an hotkey associated,
which is not the case, because the list of supported hotkeys has a length of 3.
The command is then added, without an associated hotkey.
A simple test case has been added, using the hotkey to set a state, and asserting
the presence of more than 3 items in the dropdown.
opw-3620129
closesodoo/odoo#148343
X-original-commit: ab572de20367f67aab4092b9e600e5ebd4cce4a6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes the behavior hiding the select element when scrolling has
happened. Instead of the 'scroll' event, 'mousewheel' was used, which isn't
triggered when scrolling on a touch device.
Now, the correct event is used, and the listener is given to the actual document
element, instead of being globally listening on window (in case of iframes).
This fix is part of a bug happening in the report editor of Studio, since the
select element wouldn't be reset when scrolling, but kept visible at the same
outdated position.
ticket-3496665
closesodoo/odoo#144178
X-original-commit: f53f8b2f2cba5e586dd376ddd7ec39a16741f66a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The NotificationItem component has been modified to support a new slot
allowing to display some content at the right of the notification item.
It is used in this commit to display an additional 'Install button',
inviting the user to click on the notification. Note that the entire
notification is still clickable, it is only a visual indicator.
Once the notification is clicked, the installation process is triggered:
- In case the system supports the native installation prompt, we now
display it, and the user is free to install the PWA from there.
- On Apple devices, a custom popup is displayed to the user, explaining
the steps to install the website as an application, since iOS and macOS
don't support a native prompt, and won't be using one anytime soon, since
it's a design decision from their side.
Some tests have been added to mock and test the display of the notification.
patchBrowserWithCleanup has been adapted to also remove any BeforeInstallPromptEvent
for every tests by default. This allows to test without the risk of issues with
messaging tests reading the number of notifications, or clicking the first
notification item when the service checks whether the prompt can be shown
or not (depending the availability of a native prompt, the OS, or the
localStorage, etc.).
To test the service correctly, you need to patch the test accordingly.
task-3275275
closesodoo/odoo#135866
Related: odoo/enterprise#48968
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
*: board, website
This commit simplifies the UX of the 'Custom Group by' menu. Before this
commit, many clicks were needed to apply another filter, from an accordion
menu.
Now, a select element is used instead, allowing a better user experience, by
enabling such group by directly, when an option is selected.
Some tests have been adapted to the new selectors and behaviors, and the
applyGroup and toggleAddCustomGroup has been removed, since groups are applied
when selected, and the value can be modified directly with selectGroup.
task-3458519
closesodoo/odoo#132006
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
*: analytic, base_automation, loyalty, mass_mailing, project, web, web_editor, website
This commit adds many new documentation of options and their usage for
fields. This makes them more usable and customizable in Studio, and adds
documentation for developers to know the type of expected option.
Some options that might lead to issues or that are too technical have
been removed, as they are not relevant and not required in most use cases.
task-3469741
closesodoo/odoo#134858
Related: odoo/enterprise#47148
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit adds a pager to add a limit to the number of activities
displayed by the view. This reduces the risk of performance issues
when many activities have to be fetched and displayed in the view.
There is no need to display an infinite amount of activities, so a limit
had to be set.
The 'get_activity_data' method from the model now takes the limit and
offset parameters, to only fetch activity data from maximum of 100
records.
Activity tests have been adapted to reflect this change, and that the
parameters are correctly used.
task-3487762
closesodoo/odoo#134510
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
This commit fixes the behavior of those customized buttons, used in
form view footers, aiming at saving/discarding the changes. The expected
behavior is that the dialog closes itself when those buttons are pressed,
which was no longer applied since the rewrite of views in Owl.
Also, the newly created value was not selected after saving the record.
Now, it selects it immediately if a button with special="save" has been
pressed.
A test has been added to verify that dialogs behaves correctly and close
themselves when clicking such buttons.
task-3254368
closesodoo/odoo#133602
X-original-commit: 331c2904e566cc74c46a097b2b1abe79b50d8672
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Before this commit, the tip explaining how to open in a new tab was
long and innefficient.
This commit simply remove obvious "to open" text from the tip, which
makes the dialog less cluttered.
The corresponding translation file has been updated as well to update
the appropriated terms.
closesodoo/odoo#132602
X-original-commit: 871a988f91e7f4190999a89afa854f4ed83a4fa2
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit fixes some isues with touch behaviors in the drag and
drop feature. Since commit (1), pointer events are used instead of
mouse events in the draggable hook. This makes the drag and drop
available with touch, but some issues appeared.
The following issues have been adressed by the commit:
- Scrolling in a kanban view has become difficult, since items are
dragged, and columns are moved. A simple scroll in the view to show
other items was nearly impossible without interacting with elements.
A small delay has now be introduced in the draggable_hook_builder by
default for touch interactions. The user has to do a long press (500ms)
to instanciate the drag sequence.
- on Windows laptops, the hasTouch helper would not return true, even
on PCs and tablets with a touchscreen, because 'ontouchstart' is not
present in the window object. It meant that any touch feature was not
working properly (e.g. moving icons from the home screen).
This commit adds a mediaQuery check right after the current check on
the window object, to also consider those laptops as touch devices.
Tests have been added to check the behavior of the touch drag, and the
presence of a bouncing animation when initiated. The corresponding drag
helper now has the possibility to set a custom pointerType.
task-3436591
closesodoo/odoo#132373
X-original-commit: 4c5cf0962f91d05085fea75e9c26ecdca9c0eb13
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
This commit improves the selection of records in list view using the
SHIFT and arrow keys. In task 2039894, it has been made possible to
select a range of records using the keyboard, but the experience was
confusing. So, the latest task aims to improve the situation regarding
selection with keyboard and navigation.
A test has been added to verify the behavior when selecting multiple
rows, using multiple ways of interaction (SHIFT + arrow, click,
navigate and select).
task-3418715
closesodoo/odoo#128995
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
*: mail
This commit fixes the href used by the PhoneField. Following the
specs of a phone uri, spaces must be removed from the phone number
when using the href attribute.
A test has been added to verify that any spaces are removed from
a given phone number.
In mail, the SMS button href has been edited for the same purpose.
task-3371999
closesodoo/odoo#128383
X-original-commit: 9ff0270c8acf9596ebd404627c4f5b1a98b37c59
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit makes use of the useAutoFocus hook to focus the input
when the SelectMenu opens. This usage of the hook can replace the
manual focus that was applied when the dropdown opened.
The feature can hardly be tested with newer tests, since the behavior
is identical, and the focus on the input was already tested.
closesodoo/odoo#127864
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
This commit fixes the filtering of choices when the choices or the groups
props values are updated. Before this commit, the filter was only triggered
when the length of choices or groups differ.
Instead, it is prefered to apply the filter of choices whenever those props
are updated (in a dedicated useEffect).
A test has been added, updating the choices props, while having an object with
the same number of choices, while having different values. Before this fix, the
filtering wouldn't be applied correctly, since the filter wouldn't be triggered
because the object has the same number of values in it.
closesodoo/odoo#127733
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
This commit adds the enable_formatting option to integer and float
fields. This allow an input to display and handle unformatted values,
independantly of the localization setting.
A test has been added for each type of field to verify that the
value is entered with the default formatting as 'raw' values.
task-3307126
closesodoo/odoo#121495
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit simply adds documentation in the supportedOptions of the text
field as well as the progressbar field. Since the support of documentation
has been added recently, those options were not yet documented in the
widget declaration.
This will improve the usability of those options in places like Studio
Part-of: odoo/odoo#121495
This commit fixes the display of the ColumnProgress component, which was
no longer displaying an animation when a filter is applied. This was due
to changes made in commit (1), introducing an "activeBar" key on the
value given to the ColumnProgress component.
A test has been modified to assert that the classes corresponding to the
animation are added as expected when a filter is selected.
1) 58ca40b032closesodoo/odoo#124969
X-original-commit: b4857a5c4570d3824b581003cdf456bcdc29f75f
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit adds the onInput props, allowing to run code from the parent
of the SelectMenu depending on the search value. This can be used in
situations where the list of choices must be dynamic. Also, whenever the
list of choices or groups is edited in length, the menu is filtered using
the newer values.
For example, choices can be generated from a fetch of items. Now, instead
of loading all items before instanciating a SelectMenu, a limit could be
set during the fetch, and another fetch can happen as the user type.
A test has been added to verify that the onInput props is called correctly,
and executes its code. In this test, the list of choices is edited, and we
assert that the newer elements are present in the menu.
closesodoo/odoo#124224
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
This commit fixes issues that could happen when a groupBy is present
in the load params from the ActivityModel. Before the rewrite of the
view to Owl, this code was present but was forgotten. This causes
crashes whenever web_search_read is then called, leading to undefined
record in the template, and crashing the view.
Now, the groupBy param (if present) is replaced by an empty array.
A test has been added to verify that during the load, even if the
ActivityModel has received a groupBy in its load parameters.
closesodoo/odoo#124215
X-original-commit: b6fa8ec174f5467baaed32b0c12acd0224757281
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
This commit fixes the display of subfields in the export dialog. Currently,
after a search, the results are filtered to only show the matching results.
But when unfolding an expandable field, the results are not shown below. It
is only set visible after the search has been modified to rerender the list
completely.
Now, with this commit, the list is updated as the field is unfolded.
A test has been added to verify that the element is loaded and displayed as
expected.
opw-3316900, opw-3302785
closesodoo/odoo#123707
X-original-commit: bc18cd55f97ec6119717455217372bac161c9b07
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit improves the behavior of the signature dialog. Now, we don't
force the display of the dialog to the draw tab after a click has been
made on a field with the signature widget. The dialog has already supported
the management of the default tab when no defaultName props is given.
A test has been adapted to test this new behavior. This test used the full_name
attribute to verify the presence of the 'Auto' button. Now, this button is
selected by default.
task-3259468
closesodoo/odoo#122600
Signed-off-by: Georis François (fge) <fge@odoo.com>
*: project, web
This commit adds the title and aria-label attributes to the activity
button. This makes the hover display the summary or an explaination
about the button, especially when there is no text displayed next to
the button (in Kanban view).
In the state selection field, a title has been added when hovering
the state in kanban, allowing to see the current value. The project
task state selection has also been adapted to have that title attribute
set on the toggler.
task-3207639
closesodoo/odoo#120871
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit improves the suggestions displayed to the user when editing
the date or datetime options in the sidebar of the Import action.
A tooltip is also displayed next to each label, to let the user know how
to format properly the date if he wants to write a custom one to match
his own needs.
Since commit [1], a legacy utils was imported to convert a moment format
to strftime. Since this file was legacy, it was needed to remove its import
from the import action and replace it with a newer utility function. Because
this function was not imported elsewhere, it could be removed completely.
In dates.js, a new function allow a user to write a date format in a
human readable format, while converting it to a valid Python strftime
format, to send back to the server the right date.
A test has been added for this improvement.
[1]: 2361f021c3
task-3248787
closesodoo/odoo#117750
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit aims to make the SelectMenu easier to use with a better
navigation system, and the ability to select a value with the enter
key.
The bottomArea slot no longer adds a div, which could allow to use
DropdownItems in this slot, and navigate fluently from other options.
Those improvements are required by task-3134491, which will replace
a select2 input with the SelectMenu instead.
Tests have been added for the navigation behavior and the selection
with the enter key.
closesodoo/odoo#119934
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: mail, mass_mailing, sms, web_editor
This commit adds a new supportedOptions attribute that can be added to any
field widget metadata object. This documentation can be used from other places
(Studio for example) by getting the field from the registry and then read
this key. This attribute can contain an array, detailing the list of available
options for the field widget.
By using an array, it can be ordered easily without having an object with keys
unalphabetically. Ordering the options can make sense, especially when two
options are tied to each other, it is easier to group them one after the other.
(eg: 'start_date' first, then 'end_date')
Each option documented is an object and has the following attributes:
- help: contains more details on the current option and its use
- name: name used in the options object from the node
- label: a label with a more explicit name than the option name
- type: the type of value that must be used as a value (string, boolean, selection, field, domain)
- choices: for options with a 'selection': can be used to know available values
where multiple values can be chosen as the value. This must be
an array containing the options.
- availableTypes: for options with a 'field' selection: can be used to filter the
available fieldNames to choose as a value.
- default: the value that is used by default, when the option is not set
in the options
task-3259617
closesodoo/odoo#118713
Related: odoo/enterprise#39847
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With commit (1), the clear button is only displayed when a selected
value is found from the available choices. But since we used
shallowEqual to find the corresponding choice, we couldn't use objects
containing objects in its values, since a simple comparison was made
in the utility function. This was a wrong usage of the SelectMenu and
we don't want to support objects and arrays as values. The value
attribute should only be a string, and it's the parent responsability
to handle any object related to this string.
The test using an object and an array as values has been removed since
it had no purpose after the removal of this partial and wrong support.
With this fix, an assertion for the presence of the clear button has
been added instead for the import action.
(1): d760b81271closesodoo/odoo#119298
Related: odoo/enterprise#40177
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commits aims to improve the search feature in the export dialog.
Now, the search isn't resetted when a field is added to the export list
anymore. It is also possible to search in the list of fields using the
technical name of the field.
A test has been added for the search feature in debug mode, and another
one has been adapted to verify that the search input still contains the
string previously entered.
task-3266632
closesodoo/odoo#118767
X-original-commit: 83e58a0e7e1a6f50ad03a098829946d56393d496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the search feature of the export dialog. Before this
commit, it was impossible to display subfields that would match the
search pattern, since the filter was only applied to look for fields
at the 'root' of the available fields.
Now, it is possible to search and find subfields that matches the
pattern, and they are displayed inside their expanded parent(s).
A test has been added and verify the search feature.
task-3245492
X-original-commit: cd581aa41874dadb5c87605ed49b105959f1b222
Part-of: odoo/odoo#118767
This commit allows the customization of the bottom area of the SelectMenu
component. The slot can show additional information, of handle any feature
related to the state of the component, such as adding elements, etc. It can
support any kind of content, so it could be used to display all kind of
useful content.
Two test have been added using this custom slot, asserting its presence and
testing an interaction with its content.
This changes is required to use the SelectMenu component in Knowledge, in
task-3134491
closesodoo/odoo#117890
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commits makes the TagsList component able to display icons as well
as images were previously supported. A test has been added to verify the
presence of the icon set in each tag.
closesodoo/odoo#117751
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: project
This commit adds test to this component and removes unused props. Since commit (1),
it is now considered as a core component. Those props have been removed from the
props declaration, to better match the real usage of the component.
Since the className props was not present:
- The o_kanban_tag class given in theory were not set in practice. The rules
corresponding to that class were already adapted to fix the display of tags in the
kanban view. It was possible to get rid of the references to the o_kanban_tag class.
- The o_field_property_tag_readonly class was also missing, and the logic to prevent
the click on tags was duplicated in the onTagClick function. This makes the class
useless. I removed mentions to this classname. Instead, each tag has the pe-none class
using the same condition, but set in the tag declaration.
(1): 129fa3f150
Part-of: odoo/odoo#117751
This commits exports the SCALE_LABELS list from the calendar_controller.js
file. This allows us to import and know the list of available scales from
other locations (Studio for example), and be updated with the supported
scales with their value and label.
Part-of: odoo/odoo#115799
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.
This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.
Part-of: odoo/odoo#115799
This commit adds the ability to select multiple values from the
SelectMenu component. A list of tags are displayed in the toggler
to remove already selected values, and selected values are colored
in the list of choices.
This feature is similar to how jquery select2 handles multiple
selections, by adding the values in the input toggler. The feature
will be used by the studio sidebar during the refactor.
Part-of: odoo/odoo#115799
This commit makes some changes to the SelectMenu and DomainSelectorDialog
components, since they are now used by web_studio, in the sidebar editor.
Those changes makes them more in line with the features that were used by
their legacy counterpart.
Part-of: odoo/odoo#115799
This commit improves the Notebook component to support the ability to
disable some tabs. Once the page is disabled, the tab is greyed out
and set as inactive. Also, an icon can be placed in the tab, before the
label.
This change is used since the Notebook component is used as the sidebar
element during the web_studio refactor. The sidebar needed to disable a
tab depending certain conditions. Now, the component has this behavior
by default once a page has the isDisabled attribute.
To display an icon before the label, you can use the icons props, as an
object, which keys are page names, and values are font awesome classnames.
A test has been added for each new feature introduced.
Part-of: odoo/odoo#115799
This commit fixes a crash that occured when selecting an existing template
in the export dialog, in debug mode. Since the /web/export/namelist returns
a 'name' and a 'label', the template didn't had the 'id' attribute set on
the element and the key couldn't be set properly in the template of the
component.
Now, the id attribute is added and the list can be displayed as expected,
without any crash. 'label' has been set as 'string', to make the component
use the same naming in the template and reduce potential issues. A test has
been added to verify the behavior of the dialog in debug mode, which displays
the field technical name next to its label.
task-3255591
closesodoo/odoo#117378
X-original-commit: 1aa090c6393a13f02f238c5a569875022e27a4aa
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
Before this commit, when a user moved its mouse from only a few pixels,
a kanban record could not be clicked on it, or an item in a sortable list
couldn't handle the click, since the dragging state was immediatly applied
to the element.
Now, there is a 10 pixels tolerance, meaning that the dragging sequence is
only applied once the user has moved the cursor from at least 10px horizontally,
or vertically from the original point where the mouse button was pressed and
remains down. This reduces frustation when the user didn't intended to move the
kanban card with the mouse moving by mistake.
A test has been added to verify the behavior when dragging an element in a sortable
list, from at least 10 pixels.
Finally, a test had to be modified, since the triggered mousemove didn't had any
clientX value to enable the dragging sequence.
task-3233698
closesodoo/odoo#116113
X-original-commit: 7e7c950f07b6455118902c15f4354e6ff45ce509
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit fixes the exported fields list used by the export dialog. Since the
list was deducted from the column titles, it was not possible to get the complete
attributes required to filter them. Now we use the real fields fetched from the RPC
in the dialog. It fetches the correct list of exportable fields, and the
defaultExportList props only serves to list fields associated with visible columns.
It is now possible to filter fields correctly, and improve the reliability of the
export feature, to use the data from the RPC instead of using the data deducted from
the visible columns only.
A test has been added to verify the presence of a field that has the defaut_exportable
attribute in the export list by default.
task-3203958
closesodoo/odoo#116003
X-original-commit: 9ea5cf81a2b5ddcb0f19827d4a699193046fafb6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the behavior of the FileInput component. Since the html
element of type input doesn't trigger its onChange when a file with the
same name is given twice to the input, we must first clear the input value,
which will cause the input to handle the file even if the input already
contains this file.
Even if that seems unnecessary, this is an easy way to fix issues in the
base_import action were data are not send back to the server when re-uploading
the same file to let the server process the data.
A test has been added to assert that the onUpload is effectively called twice
when uploading a file, even if it's the same exact file.
closesodoo/odoo#114978
X-original-commit: d4a23c521d0e15f893d74e3530bc68ef19641f48
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit fixes the style of the "Add a note" element in the
activities menu list. Before this commit, the background was white
because the color was hardcoded in a scss file. This is not longer
the case with this fix.
Also, the input has a transparent background to match with the
background color.
task-3208042
closesodoo/odoo#114143
X-original-commit: 5829183b57478b3316cacda931c2245b17896a63
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: hr_skills, project
This commit improves the behavior of the ProgressBar field. Before 16.0,
views had a readonly mode, and to avoid having the inputs always visible,
the user had to click on the progressbar to enter into an edition mode.
Nowadays, this is redundant, and make it difficult to guess that the field
is editable. With this commit, the input is always visible, which also
allow to improve the template and the code of the component. The commit
delete unused props/options that were no longer used by the widget.
This commit also remove a legacy scss file that was still present, and the
style of the component has been moved to its own file. Some dead classnames
have been dropped, or replaced by bootstrap classes, reducing the size of
the scss file.
Tests had to be adapted, because some assertions were irrelevant, or were
triggering the click to enter edition mode.
task #3178958closesodoo/odoo#113002
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit revamps the UX of the StateSelection field widget. Now, instead
of filtering the options by removing the current selected value, the field
displays the entire list in the dropdown, and the selected item has a
checkmark to indicate its status.
This allows us to remove the tooltip, since its presence was not useful
anymore, and was unintuitive to use. This changes required to adapt some
tests asserting its presence, as well as the number of items shown in the
dropdown menu.
task #3177182closesodoo/odoo#113203
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the appearance of the select element in dark mode.
Since the background color is set with transparency, a white background
was set on the options dropdown by desktop browsers, which made the
text difficult to read. By adding a color to the options, we can fix
the appearance without the need to put a color without transparency
on the select elements.
task #3147138closesodoo/odoo#113106
X-original-commit: 194a6506a933665cc47ca96d976a0aa304eb864c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
Since commit (1), the write/writeText were no longer correctly called,
because the browser native functions couldn't be called. Sometimes, it
raised the "Illegal invocation..." error, or could have an unexpected
behavior, preventing the value to be copied in the clipboard, which made
the button pointless.
No additional test was added, since it is difficult to test the clipboard
API programmatically, and the current test coverage is all that we can do,
without using the real clipboard object.
(1): 9cdcd1c1f7219030386d2c90205ea083eb835a13
closesodoo/odoo#112843
X-original-commit: 767922d43334a6cbccdb4be64f207813240fd314
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the wrong label that was displayed when options
are defined inside groups. Since displayValue was only looking for
a label on choices set using the choices props, the getter was only
returning the technical value for choices defined in groups.
A test has been modified to verify that the correct label is shown,
also on choices present inside of a group. This test previously
asserted that, but only on choices given by the choices props.
closesodoo/odoo#112766
X-original-commit: 176e61d5c25111a1e9339a0687bb526d1d430790
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit fixes the placement of the add icon that could be on top
of the next line in the export dialog, when the name of the field was
too long. This overlapping prevented to press the button of the next
line. This is due to a fix made in commit (1). Now, it is correctly
displayed without overlaying, both in ltr and rtl directions.
Also, because there was not enough padding and some browsers are using
overlay scrollbars on top of the buttons, it was in some occasions not
possible to press the buttons, because the scrollbar was covering the
whole area. In the list of fields, only the first level of elements has
the padding, to avoid having a cascade style when unfolding items.
Static props have also been added to the component, as the component was
introduced without them.
(1): https://github.com/odoo/odoo/commit/f10a4886d2c2bfc0d4643e0e4597e62c2ba4f94eclosesodoo/odoo#112570
X-original-commit: 66207b9ffc353bd52993622cc528494b49eedc27
Related: odoo/enterprise#37037
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit fixed the ExportDialog used when there are the same
field used multiple times in a list view. Since those duplicated
elements were given twice to the dialog, there was a bug causing
a crash due to a duplicated t-key in the template.
Since duplicated fields must not be displayed twice in the list
of available fields to export, the defaultExportList has been
filtered to only return unique elements.
A test has been added to verify that duplicated fields are not
given twice by the list controller, by only displaying once the
corresponding field.
ticket #3150866closesodoo/odoo#111884
X-original-commit: 74b09fbd346f5759fc3fa8ed28ec15d5f58a7a42
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit adds a new widget to the field registry. This button
is represented with an icon and acts as a boolean field widget.
The label is shown as a tooltip when hovered.
A test file has also been added to verify its behavior.
task #3121078closesodoo/odoo#110365
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the export when all records are selected (full domain).
Since many records ids might be present when an entire domain is selected,
the request should contains 'false' instead of a list of ids. As a limit
is set in session.active_ids_limit, not all the records were considered.
This means that only the limit was actually exported instead of the full
list that is present. As the legacy implementation of the ExportDialog
allowed to export all records, the behavior has been fixed.
A test has been added to verify the correct parameter during the download
call.
closesodoo/odoo#110126
X-original-commit: 7200e1c5875bc148fb64187fd67d58a7d6c13c7c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, exporting templates were not filtered as
expected. It means templates were visible even on other domains,
polluting the list of templates of a model.
This restores the legacy behavior by filtering the domain in the
rpc and only displaying the desired template list.
A test has been modified to verify the presence of the domain
filter in the parameters of the rpc.
task #3127779
X-original-commit: 30a673c044e53bfb1edc1e6733b2c83c67e0232c
Part-of: odoo/odoo#110126
Since the rewrite of this dialog, some inconsistent behaviors were
present compared to the legacy implementation. This commit fixes some
of them.
First, many2many fields couldn't be expanded as it was the case before.
Secondly, the export list generated by default was wrong, and it has been
fixed by this commit. The defaultExportList that was computed in the as
expected for the direct export is now also used to display the right
fields from the right pane as it ignores the fields that are explicitly
not exportable.
Finally, minor UI issues have been fixed, like a wrong title.
Tests have been added to assert the correct behavior of the dialog when
selecting records.
closesodoo/odoo#109670
X-original-commit: 86b634a120de0843fbd90079e9e457818fd4acde
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
*: hr_holidays, hr_work_entry_contract
The commit introduces a new standard view component made to implement
in a consistant way the scale/select the appropriate period to display
in a view. This component is currently used by the Calendar view.
Tests have been added for this new component, as its behavior specs must
remain comprehensive. When there is no options or only one, the button is
removed from the view to keep space available, as its purpose is reduced.
This component gives the opportunity to keep the same style and behaviors
for views implementing it (eg: Calendar, Gantt) and should be used in
other views as well as soon as they are converted to Owl.
Other modules have been adapted to use the component name in xpath instead
of the span with the o_calendar_scale_buttons element. Tests have been
adapted as well.
A scss file has been modified to prevent the arrow to be misplaced on touch
devices due to a higher padding in the dropdown item element.
part of task #2867569closesodoo/odoo#109090
Related: odoo/enterprise#35435
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
In the default import options, some separators had a wrong value by
default. This commit fixes those, which will fix some failing imports.
A test has been added to verify the default options set.
closesodoo/odoo#108710
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
This commit removes the state-machine.js library. It can be remove as
this library was mainly used to handle the import action process, and
that it has been rewritten without the need of the library.
Copyright mentions to the library have also been removed, since it is no
longer necessary.
closesodoo/odoo#106265
Related: odoo/enterprise#34249
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit reimplements the import action view to fully use Owl instead
of its legacy implementation. Different components have been created to
separate the UI in smaller blocks, and a model file contains the main
aspects of the import logic.
The SelectMenu component is now used instead of the jquery select2, and some
other web components and hooks have been used or modified to bring this
action to a better state. A custom ImportBlockUI component is used, to
support custom messages and the use of components. It was required to
reimplement the loading progress and indicator used by the view.
The set_file route in the base_import controller has been adapted to remove
the usage of jsonp type of code for this situation since it is no longer
needed nowadays.
On top of the rewrite, js tests have been added to make sure the feature
behaves correctly, and to assert the intended specs.
Finally, legacy files have been removed, since they are no longer required.
Enterprise PR: https://github.com/odoo/enterprise/pull/34249
task-3092474
Part-of: odoo/odoo#106265
Co-authored-by: Bastien Fafchamps <bafa@odoo.com>
This commits adds another variant to the position hook. This one allows
a popper to be positionned next to a side, having the same dimension from
this side. A classname is then added to the popper, allowing the element
to be stylized depending of the side it's fitting.
Possible values:
(bottom/top)-fit would give the same width as the reference
(left/right)-fit would give the same height as the reference
Tests have been added to make sure those dimensions are correctly
applied when using thr fit variant.
Part-of: odoo/odoo#106265
*: project, web
This commit converts the Activity view to the current framework shared by
other views. Instead of extending Kanban view/elements, the Activity view
has been implemented by its own.
The project customization of the view has also been converted, as legacy
files have been removed.
Some tests have been adapted since some classnames might differ from the old
implementation, resulting to failing tests. But the overall testing cases
have been conserved.
closesodoo/odoo#107916
Related: odoo/enterprise#35177
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Florent Dardenne <dafl@odoo.com>
This commit moves some parts of the code used by the progress bar of kanban
to its own component. It is now clearer to distinguished its code from the
renderer code (see crm_kanban_renderer). Also, it allows to re-use this
component in other views without making a direct use of 'kanban' elements.
The KanbanAnimatedNumber component has simply be renamed to AnimatedNumber,
as this naming suggested the element was only used as a Kanban element. This
more generic name now indicates that the element can be imported and used in
other places.
Part-of: odoo/odoo#107916
Co-authored-by: Florent Dardenne <dafl@odoo.com>
This commit adds a new Unselect all button displayed when at least two
records are selected in a list view. This button appears near other list
buttons. Once clicked, the selected items are deselected and the button
disappears.
Some list view tests have been modified since that change now adds a
button in cases where it was not expected before. Those tests now verify
the behavior when the button is clicked.
task-3081101
closesodoo/odoo#107294
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit makes use of the spellcheck hook to only enable the spellcheck attribute
on the textarea element when needed (on focused element). Since form view are now
always displaying a textarea, instead of relying on a readonly state, the textarea
used by the HtmlField always displayed red underline on typos.
This means the UI can become difficult to read if there are multiple red lines in
the text. Now, it is only present on focused textarea thanks to the useSpellcheck
hook.
This change can be noticeable in many apps, including notes from records and the
Knowledge editor.
A test has been added to verify that the hook enables/disables the attribute on the
contenteditable element used by the html editor..
task #2861428closesodoo/odoo#106866
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit adds the ability to enable spellcheck on input/textarea only
if they are in focus. This avoids the UI to be bloated with unwanted
underlined text on unfocused elements. It is especially useful in a context
of form view in always edit mode.
A core hook has been introduced to allow other components to use the same
behavior without reimplementing it. It is currently used by the TextField.
It means it is also used in the HtmlField. Tests have been written, both for
the field component, and the core hook.
task #2861428
Part-of: odoo/odoo#106866
This commit fixes the styles applied to the popover in left/right
direction. Since start/end are used as the classname of the popover,
the element was no longer animated, as it is the case for top/bottom
directions.
For example, when adding data-tooltip-position to an element using the
data-tooltip attribute, the element appeared, but without an animation
for horizontal positions only. After the commit, animation is played
for any position.
The commit adapts the stylesheet of the component to adapt to the
renaming of left/right to start/end.
closesodoo/odoo#105144
X-original-commit: 14553007ec2d46cf1a70bf4e5b228d30c7a817b5
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit adds the w-100 classname to the div containing
the field used for the name of the task. It was no longer
using all available space.
After this commit, the title takes the full width available.
closesodoo/odoo#104103
X-original-commit: 482a597527a227c45afa4e0d85b0bcdcb8866a5b
Signed-off-by: Xavier <xbo@odoo.com>
This commit fixes the alignment of the progressbar in form views. A fix
that has been introduced in commit fae1d7a3e22bb6d295ca7d0550d425a9b1af934e made
the progressbar aligned to the right in its readonly state, before turning
into edition, which displayed the field on the left. Since the right
alignment is only needed in list views, the style has been adapted to only
show the 'end' alignment on that specific case.
closesodoo/odoo#103203
X-original-commit: 297dfd5499ec50967bf28bb6bf6d1a5d9269b2b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
Since o_form_view class was not placed on the right element, as the
form is displayed in a dialog, some styles were not applied in x2Many
dialogs using a form view. Now, the selector matches all cases and
dialogs will be stylized as expected, since the class is placed on the
dialog container instead of the first div.
Now, we are consistent both for dialogs and standard form views.
Tests have been adapted to work as expected.
closesodoo/odoo#102953
X-original-commit: af67305b43d51e1669df19d376d9bda7418ba863
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit fixes the behavior of the website app when creating content.
Since commit (1), once a new record was created, it was no longer
redirected to the correct page. Now, this behavior is reintroduced and
works as expected.
(1): https://github.com/odoo/odoo/commit/916a5bebb3e74047a66503ddc59299540c252831closesodoo/odoo#102959
X-original-commit: 7cfe4523d18989b0273a026000109617bbfb2d13
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit fixes the behavior of date, datetime and daterange
fields. It was no longer possible to open the date/datetime picker
by clicking on the corresponding label, since the inputs were
missing the id attribute associated with the label.
Now, it is possible again, and hovering the label will correctly
highlight the input border of the field.
Tests have been added too, to make sure this works properly.
closesodoo/odoo#102742
X-original-commit: 0e35d2b995165cfcb50db7eaec44cce7547eb4e4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_slides
This commit adapts the code of website, and modules depending on it, which
overrided the save method of the FormView controller to execute a doAction.
It was no longer possible to wait for the default save action to proceed,
because the default behavior is now to close the dialog, and here we need
to pass another parameter allowing to redirect the website to a newly
created record.
Now, a method is available directly from the NewContentModal, which reduces
the need for the service in form views. The save call pass the right method
to compute the path needed for the redirection once the record has been
created.
closesodoo/odoo#102522
X-original-commit: 916a5bebb3e74047a66503ddc59299540c252831
Related: odoo/enterprise#32448
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the behavior of the FormView in a dialog. Since the
view is only visible in edition, it is no longer necessary to keep the
dialog open after the save has been processed. If the save has been
successful, the dialog now closes as expected.
A test has been added to assert this behavior.
X-original-commit: 86f68fe072a50baf49b9a8cf06f9c1e2541756e3
Part-of: odoo/odoo#102522
This commit brings back the Send SMS button, which was no longer
visible in form views since they are now displayed in edition by
default.
It also solves the missing enable_sms option, which was not yet
ported from the legacy implementation.
A test file has been added to the sms module to verify the presence
of the button in the view.
closesodoo/odoo#101786
X-original-commit: fdb38657904202d9bfa75817289a53596b914406
Related: odoo/enterprise#32108
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit brings back the functionality to send e-mails when using
the EmailField in form views. Since they are displayed in edition by
default, the link was no longer available and the feature was missing.
A test has been adapted to assert the presence of the button.
X-original-commit: dbaa1c1083803f31d932445fed8d6324c5191c4b
Part-of: odoo/odoo#101786
This commit adds a Go to Url button next to the UrlField input. Since form
views are always set in edition mode, it was no longer possible to open
URLs by clicking on the link. Now, a button has been added directly after
the input to bring back the original feature.
Tests assert the right behavior regarding this button.
X-original-commit: e97215e78500a7b36aa0da073c767f5f96198d3f
Part-of: odoo/odoo#101786
Since form views are always visible in edition mode, it was no longer
possible to click on the phone number to start a call. Now, a button
is displayed next to the input, allowing the call to start despite
the state of the view.
Tests have been adapted to assert the presence of the button.
Enterprise PR: https://github.com/odoo/enterprise/pull/31954
X-original-commit: 4ac2f17ce6279aa745b1a930f52b86635a04753c
Part-of: odoo/odoo#101786
This commit fixes the display of files in list and in the BinaryField,
which was displaying the complete file value instead of a human readable
size.
A new formatter has been added, and the isBinSize utils has been added
to its own utils file instead of depending from the field.
A test has been added to verify the correct visibility of a file in a
list view instead of showing the file content.
closesodoo/odoo#101673
X-original-commit: ff8485b2289a1157cdae608bd4223012fc67b77c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: crm,link_tracker,project,sale,utm
Before this commit, in some form and kanban views, there were
missing whitespaces, typically between icons and texts. This was
due to the transition to owl views, because we simply ignored
`&nbsp;` in archs. This commit also fixes a layout issue in
a project view, where the icon and the field should be displayed
in the same line.
closesodoo/odoo#101040
X-original-commit: f5813e348b6052436a4fabaa5837ecc37b15430e
Related: odoo/enterprise#31746
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit removes the 'bg-white' and 'pt-3' classes used in
the Notebook template since commit https://github.com/odoo/odoo/commit/68f1c90a031a7c2f751d9c8eca7ff525e9f7e206.
Now that the component is used by other components, such as the
media dialog from web_editor, it is not appropriate to add such
style in the core component.
Also, removing the bg-white class has no concrete effect in form
views, so it can be removed safely.
closesodoo/odoo#100253
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, following this flow:
- Drop a text_image snippet,
- Upload images from the media dialog,
- Change the image to an icon,
- Double click on the icon to open the media dialog again,
- Click on the 'image' tab
- The previously uploaded images are not correctly sized
To fix that, the media dialog component template is changed: instead of
rendering all the tabs and hiding the inactive ones, it only renders
the active one. This way, the images are correctly sized at all time.
Since commits [1] and [2], the design used by tabs and the Notebook
component is more consistent, which allow us to replace that part of the
template by the component.
The Notebook component receives the list of pages to render, and will
generate the right subcomponents in the content part of its template.
[1]: https://github.com/odoo/odoo/commit/68f1c90a031a7c2f751d9c8eca7ff525e9f7e206
[2]: https://github.com/odoo/odoo/commit/ff0b2d441252560a076a3609d81c369f0ce42d19
Part-of: odoo/odoo#100253
This commit improves and fixes the styles used by
CopyClipboard[...] fields. Before this commit, the
char type was not truncated when the text was too
long, and the Copy button appeared centered but not
stretched to the edges of the container. Now, a grid
layout replaces the flex layout, which bring a more
consistent UI.
Text: the text is not cropped but goes to next line
Char/URL: the text is cropped to fit in the space
closesodoo/odoo#99991
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit hides the <a> representing the phone
number if it is unset. Before this commit, it
could display "false" instead of being invisible.
Now, the <a> element is no longer added to the DOM.
A test has been added to assert that behavior.
closesodoo/odoo#99905
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the size of an image being set with
a 0 when it was given using the 'size' option.
In legacy, when 0 was given to one of the parameters,
it was simply ignored and not set on the image. Since
the fields has been converted, it was set and the image
was not visible, because of an height/width equal to 0.
A test has been added to assert this behavior.
closesodoo/odoo#99613
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commit fixes the BooleanField which didn't
turned the row in edition when clicked on it since
the event was stopped by the Checkbox component.
The disabled input should not stop the event, since
the component do not need to handle a click being
done on it.
The test in editable list has been adapted to add
this assertion.
closesodoo/odoo#99759
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the alignment of fields in the
setup wizard template. Since the conversion of those
fields, some parts of the DOM have been altered, and
the oe_inline class makes the inputs and selects
elements larger than it should.
After this commit, and its enterprise counterpart,
the UI is correctly aligned.
closesodoo/odoo#99675
Enterprise: https://github.com/odoo/enterprise/pull/31103
Related: odoo/enterprise#31103
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the StateSelection field, which
displayed the wrong value on hover. In legacy, the title
attribute was set to display that value. Now, it has been
replaced by a tooltip, since it can be used with touch
and is more convenient to use. A test has been modified
to assert the presence of the data-tooltip attribute.
closesodoo/odoo#99561
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
This commits fixes the behavior of the confirmation dialog.
When a user dismiss a dialog using the close button or the
ESCAPE key, it should expect to execute the cancel action,
if any had been given to the dialog.
The behavior was missing, and the dialog was simply closed.
Tests have also been added, since this core component didn't
have any test since its introduction.
closesodoo/odoo#99418
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: survey
This commit brings back the correct behavior on blur
to the progressbar field. It turns as a text value as
soon as the user has focused out of the input. It
also removes the wrong usage of the max_value option.
The behavior was wrongly adapted from the legacy
progressbar implementation. Tests have been adapted
to assert the correct behavior.
closesodoo/odoo#98902
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the style of the field, which was
pretty broken since the Owl conversion.
It also bring back the tooltip (as in legacy) when
the button is clicked.
The button now only shows the tooltip if the text
has been copied successfully to the clipboard, and
not appear when it is not allowed or not available
in the browser.
Tests have been added to assert those behaviors.
Enterprise PR to adapt a selector in tests:
https://github.com/odoo/enterprise/pull/30832closesodoo/odoo#98340
Related: odoo/enterprise#30832
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In commit 0194fa8236144596042a20f182ec3f48ea29b998, we fixed
the appearance of the color list in the livechat channel view.
But w-auto classnames were not added to some fields, which let
the positioning issues only partially fixed.
This commit concludes the fixed introduced in #98755.
closesodoo/odoo#98871
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit reverts changes that are no longer
necessary since PR #98711 which fixed a lot
of issues regarding styles and alignments.
closesodoo/odoo#98867
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the style of the lightbulb icon
present in the settings of a project.
After this commit, the icon is now displayed
inline with the text.
closesodoo/odoo#98755
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes the style of the color selectors
in a livechat view. New classnames have been added
to revert to the intended appearance of the field
in the view.
Part-of: odoo/odoo#98755