The percentage pie field was broken in enterprise, because the rules
that it needs are overwritten in enterprise but scoped to the legacy
version only.
This commit moves the community rules so that they always apply and are
not overwritten, it also removes an extra level of wrapper on the field.
X-original-commit: e3dfb1bbaa7aa2bf2bed62fb278e09c739503f4b
Part-of: odoo/odoo#102611
Add missing `o_list_activity_cell` class used to allow the text overflow
and a rule to applies the o-text-overflow mixin on their spans child
Steps to reproduce:
> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> Reduce the size of `Assigned to` or `Activities` column
=> The displayed text isn't ellipsis
closesodoo/odoo#102608
X-original-commit: fabc5350904c207bda6e7cdffbae0d7309769e89
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
before, currencies were not aligned properly with the input field.
now, it is properly aligned.
closesodoo/odoo#102607
X-original-commit: 4be4d11d75f6a211685d122b6e1f2b97476c5416
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Add missing feature of the ModelFieldSelector popover :
* keyboard navigation
* additional debug value
* add default value page ( for dynamic placeholder)
* add validate callback
Migrate dynamic placeholder to be compatible with new OWL field.
task-2978722
X-original-commit: 929108e29168058fad5da85e0ff9c66d2c5b2525
Part-of: odoo/odoo#102603
The purpose of this commit is to allow the restoration of open pages
in notebooks of a form view when switching view.
How to reproduce?
- Go to a form view with a notebook.
- Select a page in the notebook
- Go to another view
- Use the breadcrumb to go back to the previous form view
Before this commit:
The page opened in the notebook is the default one (the first one
or the autofocus one)
After this commit:
The page opened in the notebook is the one previously selected
closesodoo/odoo#102468
X-original-commit: 160c0347526612b6e6f93b8079eeb868d37d48f4
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit, in new views, it is no longer possible to click
on buttons with barcode_trigger="..." using a barcode scanner.
Why:
New views no longer propagate all attributes to the button.
How to reproduce:
- Go to a form view with a button with barcode_trigger="doit"
- Scan "O-BTN.doit", "Enter".
Before this commit:
Nothing happens.
After this commit:
An event click is applied to the button.
closesodoo/odoo#102423
X-original-commit: b4cb2ee2662173e08f671eb736130f8332265de7
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before, carret was not contrasted enough which made it less visible.
Now, it's more contrasted and visible.
closesodoo/odoo#102564
X-original-commit: 49ffc05da315a9060233c9960038dd0b36a54d91
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Previously, the emoji data that is used in the emoji grid was part of
the main assets bundle. This file is almost 500kB and the data it needs
is only needed when opening the emoji grid. This commit moves this file
into its own bundle and only loads it when opening the emoji grid
instead.
This PR also batches the inserts in the emoji model, bringing the time
it takes to do those inserts from ~8000ms to ~800ms.
closesodoo/odoo#102562
X-original-commit: e272e4fc6abce3153cce3748d8a5a7df63565916
Related: odoo/enterprise#32468
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, in a list view, it is possible to have two records
in edit mode at the same time if an error is thrown when saving
the editedRecord.
The editedRecord is the only list record that can be in edit mode.
Why:
If a server error is returned when saving the editedRecord, then it
stays in edit mode but is no longer considered the editedRecord of the
list. It is therefore possible to switch another record to edit mode.
Solution:
The record that fails its save due to the error should stay the
editedRecord of the list.
How to reproduce:
- Go to a list view
- Edit a record
- Click on another record (the "write" operation returns an error)
- Close the error dialog
- Click again on the other record
Before this commit:
Both records are in edit mode
After this commit:
Only the edited commit is in edit mode.
closesodoo/odoo#102560
X-original-commit: 77092167cf8f8fca11a39005d720fa82abeec0ae
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Before this commit
Suppose that in a form view, there is an x2many list view
that would open a form view dialog when edited.
For the dialog to open, the concerned record is duplicated and
passed in props to a FormRenderer.
Now suppose that this form view dialog also has an x2many list
view rendered somewhere: the StaticList datapoint attached to
this list will have the same context as its parent.
This is not what we want because some of the keys of the context
does not make sense with the list's model.
In fact, it has led to tracebacks to be displayed in case of we want
to open a record of this list in another form view dialog.
- After this commit
When those lists are created, their context are cleared from
their parents' keys starting with "default_" or ending with "_view_ref".
closesodoo/odoo#102557
X-original-commit: 1ba468706295f651105ca3fc8aae477b4f05c28e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
# Before this commit
The viewswitcher in mobile would take the whole width of the device.
# After
Fixed
# Explanation
The dropdown menu is positioned through the usePosition hook.
For this hook to compute a position, 019bbef
ceiled all the compared values.
But it may occur cases where the comparison was missed by a pixel.
Here we relaxed those comparisons in
manner that they may sometimes be off from 1 pixel, but at least the
positionment behaviour will be better.
closesodoo/odoo#102548
X-original-commit: 4c82a2bba675c71b57001fda0c2e242ddba99997
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
# Before this commit
The searchmenus are aligned to the right when there is no view switcher.
# After this commit
They are aligned to the left
X-original-commit: 2a167da8096730c2bf4348e19649a0f957144b6d
Part-of: odoo/odoo#102548
The commit e88988f mistakenly changed a scss rule
for the control panel bottom right section.
This commit reverse that.
X-original-commit: cc3bf7f736fe5778b4a93f1b439221557d2c8564
Part-of: odoo/odoo#102548
Restore the old CSS rule:
```css
.o_form_view .o_group .o_field_widget {
width: 100%;
}
```
Also note that since grid, ´.o_inner_group´ doesn't have the
´o_group´ class anymore.
closesodoo/odoo#102533
X-original-commit: 98dc0b9b9c17354d03714cb51fd3e310f16bef6a
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Only on devices not handling touch.
Before this commit, the phone, email, and selection fields always displayed
their field as in edit mode, even if not hovered.
eg. The envelope button of the email field, the SMS and call button of the phone field
and the caret of the selection field where always visible.
Since the form is always in edition, it doesn't make sense to always display those elements.
This commit makes those element display only on hover and on focus.
closesodoo/odoo#102489
X-original-commit: f87aa36f42fc190285241aeb8e1a4d9ab1644989
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This is a followup to: https://github.com/odoo/odoo/pull/102268
When navigating around the view with keyboard arrows:
**Before this commit:**
- there is blue outline on focused cell
- focused row is not highlighted
- https://youtu.be/kD72hic7dME
**After this commit:**
- row is highlighted when hovering or focusing
- no more blue outline on focused cell
- https://youtu.be/qqSqOVaqbEAclosesodoo/odoo#102512
X-original-commit: ded2cf44a7b6d6b79dbe8317be2018da922e0cfd
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@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
Before this commit, in debug=assets, if a test crashed for
instance because we try to click on an element that doesn't
exist, we tried to load the stacktrace js lib, via loadJS.
However, in the test environment, loadJS is patched to go
through mockRPC. If in that particular test, mockRPC did
an assertion (e.g. assert.step), we entered an infinite loop
of loadJS calls, which obviously made the tab crash.
With this commit, we ensure to use the real loadJS function
when we want to fetch the stacktrace lib.
closesodoo/odoo#102295
X-original-commit: 0661c8fa1dad88b1f9c9e177e25ddb97211f55a2
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Causes inconcistencies in the case of a o_form_nosheet (form view
without a <sheet> tag) and are visually not obvious enough to warrant
inspecting this very deeply. Remove them entirely.
closesodoo/odoo#102511
X-original-commit: 018a7a0706928930486e324dbac32c2497ec52ba
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
This reverts commit 8d7bcc8eee7a333e8e463469177a1a86f9928254.
The fix also impact a lot of form views without a <sheet> node
(o_form_nosheet), e.g. Settings, Knowledge articles, Mass Mailing, Bank
Reconciliation, widget, etc.
Not the correct solution.
X-original-commit: 00e71f3ebad40d32f74f945475fb474e89b6cf4a
Part-of: odoo/odoo#102511
Even if the `StateSelectionField` is readonly we doesn't want visual
difference and we remove the `disabled` class.
This behavior is the same as in 15.
We also remove `btn-link` as it's not appear as a link and we had to set
`p-0` to avoid the growing of the cell.
Steps to reproduce:
> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> Add kanban_state column => visual bug
closesodoo/odoo#102504
X-original-commit: 26d6942ed1b0c328d94e7dfd5e50c18a68c8c2f3
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
When the section and note fields were converted, the section and note
text field ignored the list-specialisation of the text field, resulting
in a textarea with a minimum height of 50 in list view which causes the
line to be too high. It was also not using the o_field_text class which
among other things hides the resize handle on the text area which looks
weird in list view. This commit fixes that.
closesodoo/odoo#102465
X-original-commit: 5735f89245f8efa980069973b3dbe94beac59061
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Going to My profile (user menu item when hr installed), the user name
is not fully displayed in the breadcrumb although there is enough space
to display it. We fix that by removing a rule that has become apparently
useless.
closesodoo/odoo#102492
X-original-commit: 09b5b83b41cd450359993eaca510d2e5b5a429ea
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
If the kanban box template is too simple, with basically no classes to
wrap content, the tags would suddenly take too much vertical space and
overflow the kanban card.
Since the property h-100 doesn't seem to be actually needed, it's
removed.
closesodoo/odoo#102491
X-original-commit: 571017873a4099fd4f514e6cc186d1bf03778d9e
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
- Before this commit
The carets of autocomplete fields and datepickers inputs is behind the
text if the value shown in the input is too long.
- After this commit
Fixed.
closesodoo/odoo#102400
X-original-commit: 8027e13aa3bb515452ab48b7f9253cbde02d8b60
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit, it was not possible to edit the path via the
model field selector popover input (visible in debug mode). We fix that.
closesodoo/odoo#102462
X-original-commit: 084af201f1f4f4cb3476ab34d3dcd649a71a4254
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
**Current behavior before PR:**
When changing the focus with keyboard (keyboard navigation),
the background of the active row is grey, we don't like grey.
**Desired behavior after PR is merged:**
We want the plain old white background.
X-original-commit: bb70c3c289a3b6222bd991f0426c4e5e63359872
Part-of: odoo/odoo#102381
Both implementations of `set_cookie` in `http.py` and the one of
`setCookie` in `cookie_utils.js` are slightly different.
This commit unifies both Python implementations and replicates the same
behavior in JS:
- default the cookie type to "required"
- if setting that type is not allowed, delete that cookie if it was
previously set
task-2800976
closesodoo/odoo#102380
X-original-commit: fa8fdab2894607f1f89cdd195f62ec37af7b0342
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Previously, in form views without a sheet (eg in wizards), there would
be a scrollbar on the content. This is caused by the fact that
outer groups have gutters of size 5 in desktop which creates negative
margins on the row of 1.5rem which is 18px with the default size, but
the nosheet form view only has 16px of padding on the sides, causing the
groups to be 4 pixels too wide.
This commit fixes this by adding the correct padding classes on the
form view when it doesn't have a sheet.
closesodoo/odoo#102357
X-original-commit: 8d7bcc8eee7a333e8e463469177a1a86f9928254
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
It was missing the bootstrap form-check class
closesodoo/odoo#102321
X-original-commit: 4218a3ed6022032577c2764deefa7923db32cf89
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Allow users to use stacked line charts. The chart.js configuration
is mimicking the one inside Odoo community.
task 2888350
closesodoo/odoo#102312
X-original-commit: 1ccb2cd685c60eecd767eb15967d4b4c25262ded
Related: odoo/enterprise#32345
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit fix the following issues :
- When an event don't have a color provided, the first color was used.
The issue with this, is that that color can be used with another
filter. Now, a neutral color is used to avoid confusion.
- The filter that don't provided a color, will also use a neutral color,
to keep harmonization with the color of the event.
- The color of the current user, was missing on the user filters.
- The color attribute set on the view was taken instead of the color
attribute set on a field when the field is set as filter, which
leads to a traceback.
closesodoo/odoo#102307
X-original-commit: c83379f68f395004e1750336ced8a4a4132f67fe
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
When converting the list view to owl, the support for view widgets was
overlooked as this feature is not used very extensively and was not
tested.
This commit adds support for them and adds a test for it.
closesodoo/odoo#102193
X-original-commit: 9098c1d3cd4af8f324b5b09668e92822575f932d
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Currently, the "kanban compiler" parses the XML and post-processes all
dropdowns defined in the view.
This commit adds a "kanban_ignore_dropdown" class, allowing to ignore this
additional post-processing if one wants to add simple dropdowns within his
kanban cards that are not transformed by the compiler.
This will be useful notably for the social_twitter kanban where we use a
regular dropdown to show re-tweet options.
Task-2855647
closesodoo/odoo#102314
X-original-commit: 263ba9bae78f692ea84a85202e27e530af1c4f8e
Related: odoo/enterprise#32346
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Currently since the input has no name we can't
retrieve the file when using FormData instance.
This commit allows the developer to pass an input
name when instanciating a FileUploader component.
Task-2855647
X-original-commit: 33bc32c52bef4787ae2e529f05837c2f7dbddc7f
Part-of: odoo/odoo#102314
There was an option in the legacy ModelFieldSelector
that could be used to prevent following the relations.
This option was lost since the widget has been
converted. This commit simply reintroduces the option.
closesodoo/odoo#102308
X-original-commit: 673faab4dec7a0df434cf0575303df97a36db0f1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit, excludes the first separator from the selector to avoid too
top space.
Steps to reproduce:
* Go to sale
* Select the product menu
* Select a product (e.g. Printer)
* Click on the Price tab
* The separator on the right is misaligned => BUG
X-original-commit: 0e0a2014b31e2fc6423e80971ac451a2dfe89de9
Part-of: odoo/odoo#102246
This commit, excludes X2Many list from the selector to avoid to use
negative margin when we are in a group.
Steps to reproduce:
* Go to sale
* Select the product menu
* Select a product (e.g. Printer)
* Click on the Price tab
* The X2Many list is misaligned of the group => BUG
X-original-commit: d718ee455c05c0df419f66c0a884207322199282
Part-of: odoo/odoo#102246
Purpose
=======
The debounced timeout is useful for the auto complete when it's used for
many2one and many2many because it makes RPC calls.
But for the property tags, we don't need this timeout and it will make
the component more reactive.
Task-2980121
X-original-commit: 9701738365c50e911cb704807c929fbbb4b43c43
Part-of: odoo/odoo#102243
Bug
===
In knowledge, when we move for the first time a property, the popover
position is wrong. The technical reason is that the component DOM is
updated one time before the props changed, and so the DOM is not
up to date when we compute the new position.
Also, the popover might change it's relative position (top VS bottom)
and so the small arrow might be incorrect in that case. Always remove
it (rectangle popover better than a wrong arrow direction).
Task-2980121
X-original-commit: de37a3393b31d48add36fc6be5febf70dc3db31e
Part-of: odoo/odoo#102243
Purpose
=======
The style of the standard field has been changed due to the
"edit only" form view. Adapt the properties field style to match
standard field.
Fix a bug where the autocomplete of the many2many / tags is
displayed outside of the screen.
Change the external link icon to match the new one on standard many2one.
Task-2980121
X-original-commit: 0c8e4c03529d4306be295a59d987576ff2cab490
Part-of: odoo/odoo#102243
Purpose
=======
Allow to add the properties field in the kanban view.
An option has been added in the property definition, "View In Kanban",
to decide which field must be visible in the kanban view.
We need an option because in practice we might have a lot of
properties, and it might break the view.
Task-2980121
X-original-commit: 3af5a59c23183dd43341c1952a04354acbf3a60d
Part-of: odoo/odoo#102243