Commit Graph
12983 Commits
Author SHA1 Message Date
Romeo Fragomeli a1dbac0f9b [FIX] web: adapt checkbox and boolean_toggle for BS5
In the BS5 migration, the legacy `checkbox` and `boolean_toggle` widget
were adapted but not the OWL Component.

Also, we have tweaked the old widget and the component to have better
positioning and margins.

Note:
the CSS for the print is already done in BS5
```css
@media print {
  .form-check-input {
    color-adjust: exact;
  }
}
```

Also we change `offsetWidth` by `getBoundingClientRect().width` in
`list_renderer` to avoid inaccurate rounding in columns width's
calculation.

Lastly a `.o-checkbox` class is added to the Checkbox component for a
more universal and context independent targetting.

closes odoo/odoo#96185

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-01 13:26:31 +02:00
Simon Genin (ges) a63141bbd8 [REF] web: convert ribbon widget
closes odoo/odoo#96843

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 12:12:11 +02:00
Simon Genin (ges) 150f63c1b6 [IMP] web, *: add extract props for view widgets
To make cleaner code and keep a similar API than fields, the
extractProps static method is added to the the widgets.
extractProps allows making new props out of the attrs of the widget
node.

Part-of: odoo/odoo#96843
2022-08-01 12:12:11 +02:00
FrancoisGe 11d79784f6 [FIX] web: create a Record in a ListView with a context
Before this commit, in a ListView, the view context was not used when
creating a record.

This caused some problems:
- the record does not use "default_" to initialise its data
- server-side required fields that are not present in the arch and
 have a value given in the context return server errors

closes odoo/odoo#97165

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 10:55:56 +02:00
Jorge Pinna Puissant 52509f04eb [FIX] web: take into account invisible buttons
Before this commit, an error was raised when an invisible button was
found on a list view (for example, if it has a group).

Now, the invisible buttons are correctly managed.

closes odoo/odoo#96963

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 10:55:40 +02:00
Ivan Yelizariev 31c45b321b [FIX] web: fix css issue with rtl in calendar view
This commit fixes following html block [1]

``` xml
<div class="fc-content">
            <span class="fc-time">08:00</span>
            <div class="o_event_title">Mitchel Admin - Administrator</div>
</div>
```

`rtlcss` lib changes `padding-right` to `padding-left`, which doesn't work if we
use `span` block next to `div` block, because position of the blocks are not
changed (time is still on the left side and title is on the right). Adding the
`ignore` directive solves the issue.

[1]: https://github.com/odoo/odoo/blob/4a996060e6b922fecb299eca32d6763dbb12b831/addons/web/static/src/legacy/xml/web_calendar.xml#L16-L17

opw-2925491

closes odoo/odoo#97129

X-original-commit: e6807b75e33ab3a083c84ace0b6c337e7566e64b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-08-01 09:34:39 +02:00
MerlinGuillaume fc58719d07 [FIX] web: edit radio and boolean widget fields
Fields with widget `radio` and `boolean` can't be edited

Steps to reproduce:
1. Install Discuss
2. Connect as demo and go to your preferences (top right)
3. You can't edit your notification type

Solution:
Use widgetOptions' mode along with hasReadonlyModifier to disable the
fields

Problem:
This PR https://github.com/odoo/odoo/pull/88223 modified the value of
hasReadonlyModifier which is used to disable radio and boolean fields

opw-2898464

closes odoo/odoo#97106

X-original-commit: 6befccd7c8ac22fe4da2a741efeecde2d036a7b9
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-07-29 18:34:23 +02:00
Aaron Bohy d16ff3aa7c [FIX] web: actionService: consider "dialog_size" in context
In the context of an action, one can specify the "dialog_size" key
(only useful for actions in target="new"), which impacts the size
of the dialog. Before this commit, the corresponding bootstrap
classname wasn't applied. As a result, the dialog size was always
"large". This commit fixes that issue.

closes odoo/odoo#97085

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-29 17:12:56 +02:00
FrancoisGe a4df8804f4 [FIX] web: one2many contains at least 4 lines
An X2many always has at least 4 lines. If the X2many contains less
than 4 filled lines (Record or "Add a line") empty lines are added
to make up the difference.

For example, an X2many in edit mode containing only one record:
- Line containing a record
- Line containing "Add a line
- Empty line
- Empty line

closes odoo/odoo#97070

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 17:12:50 +02:00
qsm-odoo 1de5a22dfa [FIX] web: restore "auto more menu" feature ("+" button) post-BS5
Since the migration to BS5 at [1], the feature that makes a "+" button
appear at the end of the website menu was not properly working anymore
(the "+" button appeared while there were still enough spaces for more
menus).

This is because the logic uses regexes to match ml-auto and mr-auto
classes which do not exist in BS5 anymore, as they have been replaced by
ms-auto and me-auto classes (for "start" instead of "left" and "end"
instead of "right"). This also adds the new XXL breakpoint to the regex
(to match ms-xxl-auto and me-xxl-auto classes). This also adds a comment
so that if we were to grep searching for ms-auto or me-auto classes in
the future, we will find this code.

[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968

closes odoo/odoo#97081

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-29 15:53:40 +02:00
FrancoisGe 5419785092 [FIX] web: ListView invisible column base on context
Before this commit, in a ListView, a field containing an invisible
attribute using an expression to be evaluated was never displayed.

Example:
<tree>
    <field name="foo" invisible="context.get('notInvisible')"/>
</tree>
The foo column is never displayed.

The solution is to use the column_invisible modifier to know if the
column should be displayed or not. column_invisible contains the
evaluated expression of the invisible attribute by the server.

closes odoo/odoo#97066

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 15:53:34 +02:00
Pierre Paridans 7d9faadc5c [FIX] web,base: switch to newly installed lang button color
Steps to reproduce:
- Open Settings
- Add Languages
- Select a language
- Click Add
=> Text in the "Switch to..." button is miss-aligned and color is
unreadable.

This commit fixes the alignment by removing an exception to the dialog
footer's buttons alignment selector which is no longer needed and to
avoid confusion between inner-fields and buttons container.

Also, it fixes the color by rendering the language name as a readonly
text instead of a link inside a button (sic).

closes odoo/odoo#97007

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-29 15:53:24 +02:00
FrancoisGe be3163e608 [FIX] web: wait for onchanges to determine record validity
Before this commit, the checkValidity of a record did not wait for
the application of the current updates. This was causing crashes or
records being abandoned despite an update being in progress. It is
necessary to wait until all updates have been applied before checking
the validity of a record.

For an x2many in list mode:
- create a new line
- edit the line in a valid way
- click outside the x2many while the onchange is in progress.

Result before:
- display a crash

Result after:
- X2many correctly updated

For a list view:
- Create a new record
- edit a field of the record in a valid way
- click outside the list view

Result before:
- abandon the record

Result after:
- the record was saved

closes odoo/odoo#96725

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 15:53:18 +02:00
Brieuc-brd 15039761eb [IMP] mail: Adapt placeholder color
Prior to this commit the placeholder color was different when inputs
used the `.form-control` class.
This commit fixes this color difference.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Florian Vranckxandnle-odoo f294079a89 [FIX] web : error when filter has empty selection
Steps to reproduce:
	- install approvals
	- in the approvals app go to filters>add custome filter> approval type
Issue:
	- traceback
Cause:
	- When no other module is installed, there is nothing to display under
	the approval type filter. Even if the field is not required,
	the javascript try to access the first element of the selection array
	to auto-fill the menu.
Solution:
	Add a check, if empty and not required, do not display it and leave the
	field empty

opw-2895516

closes odoo/odoo#96617

X-original-commit: 7fdbb1783ec65919a709e5fcac111994d0eb3cd5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: nle-odoo <nle@odoo.com>
2022-07-29 11:32:59 +02:00
Jorge Pinna Puissant aaa7336a1f [FIX] web: btn-secondary was applied on all buttons without an
explicit-rank class

Before this commit, on all buttons without an explicit rank class (that
means, a button that don't have any of the following classes:
btn-primary, btn-secondary, btn-link, btn-success, btn-info,
btn-warning, btn-danger) the class on the props.defaultRank or the class
btn-secondary was applied.

Now, the class on the props.defaultRank or the class btn-secondary are
applied as following these rules:
-  if there is no explicit rank class and there exists a
    props.defaultRank, the class on the props.defaultRank will be
    applied;
- if there is no explicit rank class and the props forceRank is set
    (for instance, on the headers on the form view), the class
    btn-secondary will be applied;
- if the button don't have any class, the class btn-secondary will be
applied.

closes odoo/odoo#96655

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 09:12:27 +02:00
Pierre Paridans 21f22f3b7c [FIX] web: daterangepicker style in mobile
The DateRangePicker on mobile has a few caveats (sic) like its
positionning which prevents the user from accessing the buttons (cf. out
of the viewport).

Steps to reproduce (on small device like iPhone 5/Moto G4):
- Open Time Off
- Click on New Time Off
- Click on From/To field
=> buttons are inaccessible

This commit fixes it restyling the daterangepicker on smaller screens to
display it as Bottom Sheet-like element (cf. popping from the bottom of
the screen and growing upto 90% of the viewport).

opw-2803227

closes odoo/odoo#97024

X-original-commit: dd2bd3c22c22c49a60ca0541f84a64c3a613971c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-07-28 21:01:56 +02:00
Simon Genin (ges) df2562e4f0 [FIX] web, base_setup: template didn't exist because of deps
An enterprise without apps would crash on launch because of a template
web_enterprise would inherit but was only there with base_setup
installed.

closes odoo/odoo#97017

Related: odoo/enterprise#29919
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 21:01:50 +02:00
Romain Estievenart 5c00f30307 [FIX] web: forms inside dialog misaligned
Due to the refactor of the form view, `display:block` wasn't apply on
`o_form_nosheet` anymore; This is due to the fact that `d-flex flex-nowrap`
are now directly set in the DOM and thus has !important by default.

We now only use flex when this is not a `o_form_nosheet` element.

Steps to reproduce:
1. Open Sign
2. Click on "Send"
-> the style of the dialog form content is broken

task-2871070

Link:
https://github.com/odoo/odoo/commit/28200c5ad584e9b7f51ffcf7902c8d366b93e2de#diff-26a45bff860d45f36003c55996b92ced0762c62dcd94d5d79bf7b5e4094a1ee0R191

closes odoo/odoo#96964

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 16:40:35 +02:00
Pierre Paridans 171d9cffc7 [FIX] web: weird modal effect on backdrop click
Since BS5 migration, clicking on the backdrop of a "static" modal
triggers a weird scaling-up/down effect on the modal.

Steps to reproduce:
- Open Livechat Channels
- Open a channel
- Click on operator which opens a modal
- click on backdrop
=> scale-up/down effect

This commit fixes it by disabling the scaling transform effect on
modals.

closes odoo/odoo#96958

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 15:03:51 +02:00
FrancoisGe 4b7b89b040 [FIX] web: duplicate blank option in selection field
Before this commit, in a field selection, it was possible to have two
blank options.

To reproduce this problem, you need to have a non required selection
field and one of the selection sent by the server has the value false.

Our solution is to ignore the false selection returned by the server
and add the false option only if the field is not required.

closes odoo/odoo#96951

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:25 +02:00
FrancoisGe 19c2bbfa3a [FIX] web: KanbanView multi edit
Before this commit, in a kanban view, if you try to create a new record
while another one is being saved, then a crash is displayed.

To avoid this problem, when we create a new record in quickCreate mode,
we will first wait until the first one has finished saving before
creating the new one.

closes odoo/odoo#96826

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:18 +02:00
Lucas Perais cea8a6adaf [FIX] views: fields: one2many open record containing another one2many
Have a form view with a one2many list with one record inside.
Click on it to open it. The form view that will open must also have a one2many list

Before this commit, there was a crash because the information of the main record's view
was not propagated to the form view of the opened record. Generally speaking, env.config was lost.

After this commit, we propagate correctly the config.

closes odoo/odoo#96618

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 09:14:43 +02:00
Lucas Perais 6eb2238294 [FIX] tests: views: helpers: the view's env is not the global env
Before this commit in tests, when creating a view with makeView, the same env was shared for services, view and
main_components_container. This is rather wrong as bugs in prod could not be reproduced in tests.

For example: env.config was present in the env for every services and components, this is wrong as
only View must receive it in its env.

After this commit, makeView separates the env for services and top-level components from the one dedicated for View.

Part-of: odoo/odoo#96618
2022-07-28 09:14:43 +02:00
Jorge Pinna Puissant cd624c891f [IMP] web: focus trap on the dialog
This commit will trap the focus on the dialog, this will avoid modifying
a background record when a dialog is open. Trapping the focus on the
dialog is a well-known technique for modals (dialog).

closes odoo/odoo#96361

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:42 +02:00
Jorge Pinna Puissant 84a96c1838 [FIX] web: default class for buttons in a button_box
Before this commit, the buttons without classes in a button_box were
assigned the default btn-secondary.

Now, the default class for the buttons without classes in a button_box
is the class oe_stat_button

closes odoo/odoo#96881

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 05:04:39 +02:00
Samuel Degueldre c5e63850dd [FIX] web: fix tooltip rendering crashing because of lack of env
With the merge of the new views, we introduced an owl directive which is
t-call-context, that allows a t-call to execute in a controlled context
that is not the context of the component itself. In doing so, we forgot
that some existing templates rely on the presence of the env in the
rendering context for things like knowing if we are in debug mode or if
the device is small/mobile.

This commit fixes that by simply adding the env to the rendering context
of tooltuips.

closes odoo/odoo#96875

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 05:04:35 +02:00
luvi f62acbe3c1 [FIX] web: StateSelectionField style
Previously, unnecessary space was present horizontally
around the status circle. This space has been adapted
to improve the style of the widget in views.

closes odoo/odoo#96831

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 03:51:29 +02:00
luvi b77cd5ee20 [FIX] web: ImageUrlField without value
This commit fixes an issue with the ImageUrlField
widget. When no value was given, the image displayed
a broken file instead of being empty. A test
has been added.

closes odoo/odoo#96820

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 03:51:17 +02:00
Aaron Bohy 5134eac428 [FIX] web: do not display control panel in form views in dialogs
Form views in dialogs should not display a control panel. Before
this commit, they did. To fix the issue, we reworked a bit how we
pass to the Layout component its "display" information (e.g.
whether it should display a control panel, and which parts of it).
Before this commit, it retrieved this info from the searchModel, in
the env. This doesn't allow a specific view to override it, for
instance the form view when it's in a dialog. To ease this, we
changed the Layout component s.t. it now takes a "display" props,
and no longer looks in the searchModel. Each view thus needs to
pass this as props.

closes odoo/odoo#96818

Related: odoo/enterprise#29857
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 03:51:11 +02:00
Samuel Degueldre b2ec55cc32 [FIX] web: fix form view crash when notebook has name attribute
Previously, when the name attribute was set on a notebook in a form view
arch, we would pass that as a prop to the Notebook component, but this
prop is not supported by the component, so it would crash in debug mode
when validating the props. This commit fixes that by simply not copying
this attribute to a prop as it is useless.

closes odoo/odoo#96814

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 03:51:08 +02:00
luvi 37d7247df5 [REF] web: changes to the Notebook API
This commit fixes the API of the Notebook component
that mixed props of page templates with its attributes
(isVisible, title and index). Mixing page props and
attributes was confusing. Tests have been adapted
to reflect those changes.

closes odoo/odoo#96807

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-07-28 03:50:50 +02:00
FrancoisGe c2ae235ca5 [FIX] web: earlier record update for dirty fields
A field input always asks for a record update when it is the target of
a "change" event but such an event might occur after some keyboard
events (e.g. a "Enter"). In order to make keyboard navigation work, it
is necessary to make a dirty field communicate its new value before a
change event and make sure the record is correctly updated before being
saved.

Before this commit, this was done via a system based on a special event
triggered on the model each time a record is saved but that solution was
not appropriate:

- the updates done in that way were not correctly awaited.
- they would be asked for even if the save would not be the result of
  a keyboard event.

Here we replace the old system by a simpler one that works. When some
specific keyboard events occur, a dirty field ask for an update that is
correctly awaited.

closes odoo/odoo#96101

Related: odoo/enterprise#29873
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 01:29:59 +02:00
FrancoisGe 2c3b041bb1 [REF] web: no use of checkValidity in ListRenderer
This commit removes most of the calls to checkValidity outside of the
(Basic)RelationalModel.

The validity checks in ListRenderer were not useful
because the operations done after them (like a switchMode) would make
a validitity check and the expected goal would be achieve in any case.

Part-of: odoo/odoo#96101
2022-07-28 01:29:59 +02:00
FrancoisGe efad2216b3 [IMP] web: focus of a X2many
When rewriting the Form view, we wanted the keyboard navigation using
"tab" and "shift+tab" to use the native browser behaviour. The purpose
of this commit is to remove the custom behaviour of X2many in a
form view when a "tab" or "shift-tab" make it be focused.

Before this commit, a new empty line would be created automatically.

After this commit, the button "Add a line" takes focus but no new line
is created.
If one wants to add one, that can be done by pressing "Enter".

Part-of: odoo/odoo#96101
2022-07-28 01:29:58 +02:00
FrancoisGe 05c66463bd [REF] web: use editInput in some tests
In this commit, we improve some tests by making them use the util
function "editInput". Indeed those tests were incorrectly reflecting
the edition of an input: normally, change the value of an input should
trigger an "input" event.

Part-of: odoo/odoo#96101
2022-07-28 01:29:58 +02:00
FrancoisGe 857cbba5a1 [FIX] web: X2many focus handle field
Before this commit, in an X2many in editable list mode with a handle
field, if you passed a record in edit mode, the handle field was focused.
The expected behaviour is to focus the first editable field.

Part-of: odoo/odoo#96101
2022-07-28 01:29:58 +02:00
FrancoisGe 87b8feee03 [FIX] web: X2many in list mode, press multi enter
Before this commit, in an X2many in editable list mode, creating two
valid records in succession by pressing Enter caused the first record
in the list to go into edit mode. The expected behavior is to add a new
empty line.

How to reproduce:
- Create a first valid record
- Press the enter key to validate it and a new line is created
- Complete this new line in a valid way
- Press the enter key to validate it

Result before the commit:
The first record switched to edit mode and there is no new empty line.

Result after this commit:
A new blank line is created in edit mode.
If you press enter again the empty line is validated and a new line is
created.

Part-of: odoo/odoo#96101
2022-07-28 01:29:58 +02:00
FrancoisGe afa12b9f04 [FIX] web: X2many in list mode with several records in edition
Before this commit, in an x2many in list mode, it was possible to switch
several records to edit mode.
Normally, it is not possible to have more than one record in edit mode
in a list mode X2many.

How to reproduce:
- Have an X2many with at least two record already.
- Modify a field of the first line and make it invalid
- Click on the second record

Result before the commit:
Both records will be in edit mode.

Result after the commit:
The invalid record stays in edit mode and the other record stays in
readonly mode.

Part-of: odoo/odoo#96101
2022-07-28 01:29:58 +02:00
Samuel Degueldre 1a77ace252 [FIX] web: fix buttonbox crash when it receives a class
Previously, attempting to add a class to a button box would crash
because the button box divs are compiled to ButtonBox component which
did not accept a class prop. This commit fixes that.

closes odoo/odoo#96726

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 19:20:11 +02:00
Pierre Paridans 482b80fd14 [FIX] web: Kanban small column & quick create column width
Since odoo/odoo@2dd37982e6 , Kanban
column's width is flex based. But sadly two types of columns were not
adapted properly:
- Kanban small column didn't reduce the column width
- Quick create kanban column shrinked too much

This commit fixes both these issues by properly setting the flex-basis
size for one and disabling shrinking for the other.

closes odoo/odoo#96650

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 04:53:28 +02:00
Samuel Degueldre c321f5a1e7 [FIX] web: correctly add o_xxl_formview class
With the conversion of views to the new webclient, the o_xxl_formview
class was no longer applied as expected, which broke the layout and the
width calculation in embedded list views (as the chatter would take up
more space than intended during the width computation). This commit
fixes that by adding the class when needed.

This commit also moves the css rules relative to that class which are
mainly used for the side-chatter, from enterprise to community, as the
side chatter has been made available in community as well.

closes odoo/odoo#96627

Enterprise: odoo/enterprise#29803
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 04:53:06 +02:00
Pierre Paridans ccc7706878 [REF] web: remove o-get-most-contrast function
As the `color-contrast` function provided by BS5 basically fulfill the
same need as the custom `o-get-most-contrast` function and the later one
isn't used, we can safely remove the custom one.

closes odoo/odoo#96626

Note: last (and only) usage was in mrp_workorder's tablet view.
Related: odoo/enterprise#29802
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-07-27 04:53:02 +02:00
Aaron Bohy 5d2fc26336 [REF] web: domain: use shallowEqual to compare arrays
This commit refactors the way we handle the "<>" case in domain
evaluation, for the sake of consistency with the "==" case. Indeed,
we tried to avoid using JSON.stringify as it could have an unwanted
behavior (e.g. it could crash, or it could have been overridden on
the value we manipulate).

closes odoo/odoo#96614

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-27 04:52:43 +02:00
Pierre Paridans a6857f276a [REM] web,debian: remove unused jQuery.touchSwipe lib
Since the revamp of the Kanban View in mobile and the migration of the
Settings view to the OWL views, the jQuery.touchSwipe library is not
used anymore.

closes odoo/odoo#96608

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 03:35:09 +02:00
Aaron Bohy a8d5787ce0 [FIX] web: record (quick-)created in grouped kanban are on top
Before this commit, the records created in grouped kanban view via
the quick create feature were displayed in the bottom of the column
where they had been created. They should be on top. This commit
fixes that issue. Note that this only concerns the state of the
kanban view before the next reload, as from that moment onwards,
the default order on the model is used.

Issue introduced by the conversion of the kanban view to owl.

closes odoo/odoo#96606

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-07-27 03:35:03 +02:00
luvi 148c915ed2 [REF] web: remove unnecessary component
The purpose of this component was not helpfull
as it has no real use case and was only used
by the BinaryField component.

Instead of using an entire component, we only
keep the DOM that is now used directly in the
BinaryField template.

closes odoo/odoo#96357

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-27 02:18:29 +02:00
luvi 0d8e4495c0 [FIX] web: upload files with Many2ManyBinaryField
This commit fixes the wrong implementation of the
field. It was not functional and is now using the
FileInput component.

Before the commit, it was not possible to upload or
delete files from the list. Test has been adapted to
those changes.

Toast notifications were also missing, and a new
test has been added to check that a notification is
correctly displayed when the server responds with a
error message for a given file.

Part-of: odoo/odoo#96357
2022-07-27 02:18:29 +02:00
Mathieu Duckerts-Antoine 57be371457 [FIX] web: search panel: use action context when fetching data
In SearchModel, the calls to search_panel_select_range and
search_panel_select_multi_range were done without using the global
context (e.g. the action context), contrarily to what is done in the
legacy SearchPanelModelExtension. We fix that.

closes odoo/odoo#96458

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-26 20:46:47 +02:00
Jigar Patel d132421180 [FIX] web: restore .text-body class
During the BS5 migration, the .text-body class wasn't properly ported.

As it is a standard Bootstrap class and useful to override component's color with the one used by the body (ie. set a heading color the same as the content).

This commit restores it.

closes odoo/odoo#96173

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-07-26 18:44:52 +02:00