Commit Graph
15803 Commits
Author SHA1 Message Date
Achraf (abz) 8d4bb8c109 [FIX] web: Allow to hide model in ReferenceField
In legacy, hide_model attribut on FieldReference was used to hide
the model input, but it was not implemented in ReferenceField
(new version).

closes odoo/odoo#99819

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-09-16 10:09:26 +02:00
Mathieu Duckerts-Antoine 48801a0d40 [FIX] web: graph: use attribute order
For now, the graph view completely ignores the order attribute set on
its arch root node if written in the correct way, i.e. with "asc" or
"desc" (lower case). We fix that.

closes odoo/odoo#100302

X-original-commit: 0fb64bef16914937cf4a1d1618fb58ade6d16f14
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-09-15 20:17:54 +02:00
Julien Mougenot 40c81b3d8f [FIX] web: Apply correct active fields on quick created records
Before this commit, a record quick created in kanban would have values
left from the quick create form view in its `data` object, that would
then be used by the model of the parent view to perform onchange
actions.

This would cause a crash if said values were set on a field not included
in the parent view's active fields.

In this commit, records data are cleared at each load, ensuring that
they only contain values for their current active fields.

closes odoo/odoo#100182

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 19:21:11 +02:00
Julien Mougenot f26f555f0c [FIX] web: Correctly unpack groups data in kanban
Before this commit, the groups returned by `web_read_group` were
unpacked using the current 'group by' field name, and not the entire
'group by' value (potentially including a granularity for date/datetime
fields). This caused mismatches in some cases and the value couldn't be
retrieved.

Also, a needless 'sum_field' parameter was passed to the
'read_progres_bar' calls, which does not exist in the request API.

This commit fixes the first issue and removed the excess parameter.

closes odoo/odoo#100149

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 19:21:06 +02:00
Julien Mougenot d20de3113e [FIX] web: Fix mock server read_progress_bar
This commit aims to make the behavior of the mocked 'read_progress_bar'
requests closer to their server implementation.

Namely, the returned dictionnary is supposed to contains the display
names of the current groups in its keys. This was not the case and has
been fixed.

Part-of: odoo/odoo#100149
2022-09-15 19:21:06 +02:00
Mathieu Duckerts-Antoine 774aaa4984 [REF] *: remove legacy graph and pivot views
Now that web_studio no longer uses the legacy graph and pivot views and
that all their extensions have been converted, we can finally remove
them from the code base.

closes odoo/odoo#99734

Related: odoo/enterprise#31112
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 19:20:53 +02:00
Mathieu Duckerts-Antoine 505c7c1582 [IMP] web: a prop env for ComponentWrapper
We make this change to allow studio to pass a proper env to a new view.

Part-of: odoo/odoo#99734
2022-09-15 19:20:53 +02:00
Mathieu Duckerts-Antoine a0484895e1 [REF] web: view_service: ViewDescription type
Part-of: odoo/odoo#99734
2022-09-15 19:20:52 +02:00
Aaron Bohy 66d9fe67a6 [FIX] web: Many2OneField: do not display a link if unset
Before this commit, an empty many2one field in readonly rendered
an empty `<a href"...">` node. Even though that link was no visible,
it had a non null width, and was thus clickable (the cursor changed
when hovering it). When clicked, it opened the form view of the
comodel, in create mode.

This commit fixes the issue by not rendering anything if the value
is false.

closes odoo/odoo#100158

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-15 12:41:07 +02:00
Antoine (anso) 68f1c90a03 [IMP] web: make "notebook" component more consistent
"Notebook" component had to be adapted to make the use of tabs
more consistent trough the app. The component now allows a use of
default tabs style in a vertical display

task-2950591

Part-of: odoo/odoo#98706
2022-09-15 12:40:55 +02:00
Romeo Fragomeli 14d170e38b [IMP] web: set the barcode icon more generic and more Bootstrap usage
closes odoo/odoo#100082

Related: odoo/enterprise#31273
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-15 11:05:23 +02:00
Romeo Fragomeli b6a36df34a [IMP] web: convert many2one_barcode to OWL
Before this commit there is a widget `many2one_barcode` that allows
to scan a barcode.

After this commit, we have converted it to OWL, but it's more than a new
component. From now, the logic is in the basic Many2One as a
property/option (`canScanBarcode`) and we also have the equivalent
Component (`widget="many2one_barcode"`). This choice has been made to
support multiple use cases (e.g. having the product_configurator and the
barcode on the same product field).

Note:
now we use the `browser` class to allow to patch the browser feature
during testing.

Part-of: odoo/odoo#100082
2022-09-15 11:05:22 +02:00
Romeo Fragomeli 71a3048ec1 [MOV] web: move Barcode scanner to community
Move all file related to Barcode scanner (JS/XML/CSS)

Note: also the CSS class is renamed as it's not related to mobile
exclusively

Part-of: odoo/odoo#100082
2022-09-15 11:05:22 +02:00
Brieuc-brd 795891484a [FIX] web: restore checkbox/radio style
Since https://github.com/odoo/odoo/pull/98770, the style of checkboxes
and radio buttons has also been simplified. This simplification makes
them less readable.

To fix that, this commit restores the previous style for checkboxes
and radio buttons.

closes odoo/odoo#99632

Related: odoo/enterprise#31092
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 11:05:12 +02:00
Yolann Sabaux 19ed75ddab [FIX] mail: revert upload_attachment fix
Cookies should be used internally by the web UI. The server-side is not supposed to be aware of it at all.

Reverts:
odoo#88745

Based on odoo#93812
discussion. It has been decided to revert the fix to avoid further unattended behaviours.

closes odoo/odoo#100178

X-original-commit: bdde7dda7356744d459e3991a7f382fee42bf8c5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-09-15 10:03:09 +02:00
Simon Genin (ges) ddfd141165 [FIX] web: use command hook in component
Before: the command service was used inside components instead of the
hook. It introduced problems as the commands were not unregistered.
The commands were added multiple time to the registry.

closes odoo/odoo#100135

After: It uses the hook, "it just works".
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 01:23:21 +02:00
Aaron Bohy a7766e0f4d [FIX] web: SelectCreateDialog: remove padding
We don't want any padding in those dialogs. The presence of the
padding was a consequence of the rewritte of that dialog in owl.

It is a frequent usecase to remove the padding from the body of
dialogs. We thus introduce a new props on Dialog and when this
props is set to `true`, we do not set any padding on the body.

This commit refactors other usecases to make them use the added
props.

closes odoo/odoo#100045

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-14 21:22:12 +02:00
Dossogne Bertrand 074342e937 [FIX] web: better content spacing in all PDF reports
In the PDF reports, the general spacing is too narrow, for
example in tables, in the address lines etc. This commit
upsizes a bit the line-height for the majority of text/digits-based
content.

taskID 2977261

closes odoo/odoo#99837

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-14 21:21:57 +02:00
Adrien Dieudonné 51939d09f8 [REF] web, website: avoid compensateScrollbar JQuery override
In this commit, we simply set 'position' to 'sticky' on 'o_header_affixed'
to avoid to manage it's position with 'padding-top' and 'right'.

- 'padding-top' css property was used to compensate the navbar height
   at the moment where the stacking context change because of the
   fixed position.
- 'right' css property was used to prevent the menu to overlapp
   the scroll bar.

Part-of: odoo/odoo#99338
2022-09-14 21:21:24 +02:00
Adrien Dieudonné cb7cf77ed0 [FIX] web, website: avoid traceback when cookie bar is activated
Before this commit, we had a traceback if we tried to activate
the cookie bar on the website:
`_updateScrollBar` function of s_popup's 000.js

This is due to the fact that _checkScrollbar, _setScrollbar and
_resetScrollbar doesn't exist anymore in BS5.
It's why overrides of these functions were already removed
during the migration as you can see here:
https://github.com/odoo/odoo/commit/0b94da214b7017e8580e671cbaa68ade6de2fbc7#diff-348097d5de2047358549a91803882338f589af18c5dafed9f653250e150ce679L116-L138

Because of this, we have to delete _updateScrollbar and its usage.
Instead of trying to control the scrollbar, another possibily would
be to simply manage it with 'overflow' css properties.

Desired behavior:
a) Popup/Cookie bar WITHOUT backdrop, we should be able to
 - scroll the content behind
 - scroll the popup content itself
 - click on elements behind
b) Popup/Cookie bar WITH backdrop, we shoudn't be able to
 - scroll the content behind
 - click on elements behind

To do this, we now allow the scroll on '#wrapwrap' (the content).
In BS a popup has a backdrop by default and there is nothing to do
to block scroll and clicks behind the modal (on '#wrapwrap').
If the popup doesn't have a backdrop, we set 'pointer-events' to 'none'
to allow pointer event to pass through the backdrop element and annihilate
his effect. Note that 'pointer-events' property is reset by BS to 'auto'
for the popup content to override inherited value from the parent.
https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events#formal_definition

Also note that now we have the same behavior as on desktop. If the size is set to
'Full', the cookie bar is displayed without any margins and sticks
to the screen borders.

Steps to reproduce:
- Enable cookie bar in settings
- Access a website page

Related commits:
- https://github.com/odoo/odoo/commit/e5a5f98819b3a70b3e2564fb91722cab415ceea9
- https://github.com/odoo/odoo/commit/97c8cf3ac263884b3eeb9862b84a426162d9794e
- https://github.com/odoo/odoo/commit/a0ddaa8931601a3d5e91a5ba5859ba58658e8710
- https://github.com/odoo/odoo/commit/0b94da214b7017e8580e671cbaa68ade6de2fbc7
- https://github.com/odoo/odoo/commit/43ccc785546bbce7787ca2075aa18ebc76a6d36b

Part-of: odoo/odoo#99338
2022-09-14 21:21:24 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Gorash 5410b7c238 [IMP] base/web: XML templates are added into the asset bundles.
XML files are now declared in python module manifests. During the qweb
't-call-asset' directive, assetbundle will fetch the declared xml files,
apply the inheritance (t-inherit) and create a javascript service (for
eg: 'web.assets_backend.bundle.xml') which is added at the end of the
*.js mimifier file.

When the debug mode is activated, comments are added in the template
indicating which file the template comes from as well as the
inheritances applied to it.

****

JavaScript:

assets.js (module @web/core/assets) takes care of loading libraries,
javascripts and styles.
`loadJS(url)` (loads the javascript and returns a resolved promise when
the templates are also loaded via the '*.bundle.xml' service)
`loadCSS(url)` (loads the style a resolved promise when the file is
loaded)
`loadXML(xml, app=assets.defaultApp)` (load template into
application/owl, used by the `*.bundle.xml` services)
`getBundle(bundleName)` (get the bundle descriptor)
`loadBundle(desc)` (load the files and bundle from a descriptor)

templates (XML element content all owl templates)

A new `ready(serviceName)` method on boot.js lets you know when a
service is loaded are the require.

The xmlDependencies attribute no longer exists.

Python:

The xmls taken into account by assetbundle.py, applying `t-inherit`
inheritances and adding an `name_of_the_bundle.bundle.xml` service in
the generated JavaScript file.

****

Every manifest changes is into the next commit, except 'web_tour' in
this current commit as example.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Gorash ed2b117f5b [IMP] web: Added log information to help fix errors from services.
A typo fix is added.
Fix error from loading xml while widget is destroyed. Now that the xml
templates are loaded in the bundle, the error appears more frequently.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Gorash 48c267e9a5 [IMP] web/http: Added support for immutable property to serve files
When a file is immutable the different network layers can cache it.
Services receiving this header should never invalidate these files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:00 +02:00
Julien Mougenot d121ce8cdd [FIX] web: Fix filtering by progress bar in kanban
This commit addresses 2 issues in kanban views with progress bars:

1) When updating the field on which the progress bars are computed in a
record, an inert "Load more" button would appear

2) After updating said value, the progress bars would not be recomputed

Both of these problems have been fixed.

Part-of: odoo/odoo#99748
2022-09-14 18:16:09 +02:00
Denis Ledoux 00a168f1cc [IMP] web: rename "Fields View Get" debug menu in "Get View"
Following the refactoring done in odoo/odoo#87522
renaming `fields_view_get` into `get_view`

closes odoo/odoo#100086

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-14 04:23:44 +02:00
Aaron Bohy 37f9c31231 [FIX] base_import,web: do not allow import if create="0"
This commit is three-fold:
 1) we now honnor attributes `create` and `import` which can be
    set to a falsy value in archs (and in these cases, we disable
    the import feature)
 2) we converted the base_import test suite to use the owl views
 3) we whitelisted the base_import addon for the lint/prettier
    script

closes odoo/odoo#100026

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-14 01:52:47 +02:00
Damien Bouvy 54438fdebf [IMP] web: remove useless tooltips in standard views
Tooltips (and aria-label) should be used when the content of the element
is not self explanatory; but in the case of the create/save/edit buttons
available in several view control panels (kanban,list,form), tooltips
with dubious usefulness were added (e.g. "Create record" when you hover
on a button labeled "CREATE" is not really an information bomb).

Since these buttons tend to be used in tours, and the "coucouilles"
of the tours will also be some sort of tooltips, it means that you
can have frequent weird visual interactions between nunuts and stupid
tooltips.

This commit removes these stupid tooltips.

Feedback-2973374

closes odoo/odoo#100078

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-09-13 22:16:13 +02:00
Aaron Bohy dd72a40926 [FIX] web: can't save o2m with not new dirty invalid record
Imagine a form view with a one2many editable list, containing a
required field. Open an existing record, s.t. in the one2many
there's already a sub record. Modify that subrecord, s.t. the
required field is unset (e.g. empty it, or it can be unset from
the beginning, but then modify another field). Then save the main
record. Before this commit, the record could be saved.

In this situation, the modified one2many record isn't valid, so
we shouldn't be allowed to save. The view should remain in edition
and the invalid field should be indicated.

This commit fixes this issue.

closes odoo/odoo#100059

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 22:16:08 +02:00
Pierre Paridans 0c4819f8c3 [FIX] web: list selection banner takes the whole width on mobile
On mobile, in list view's selection mode, both the left & right bottom
parts of the ControlPanel are displayed but only the left one
(containing the selection banner and actions menu) should be displayed
(and take the full width).

Also, small alignment adjustments.

closes odoo/odoo#99483

Related: odoo/enterprise#31269
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-13 20:30:01 +02:00
Pierre Paridans 2736d832bd [FIX] web: Layout's display props could be dynamic
Before this commit, if the Layout's `display` props is a dynamic value
coming from the parent Component (ie. a getter on the component that
controls which parts of the ControlPanel should be displayed), this
value isn't applied after the first initialization.

This commit fixes it by extracting the `display` logic applied in the
constructor to a getter (moving from initialization only to once
called).

Part-of: odoo/odoo#99483
2022-09-13 20:30:01 +02:00
Dardenne Florent (dafl) 30bcdf1b91 [IMP] web: kanban: add bottom quickCreate button
The purpose of this commit is to add a quick create button at the bottom
of each column in order to facilitate the user when he wants to quickly
create a record.

It was already possible to quick create a record in the kanban view.
To do so, the user needed to click on the quick create button placed
on top of the kanban view, forcing the user to scroll to the top of
the view if he consults records at the bottom.

task-2823605

closes odoo/odoo#98703

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-09-13 16:27:47 +02:00
Aaron Bohy 8640f33b36 [FIX] web: FormView: do not switch record if invalid
In a form view, modify a record s.t. a required field is unset,
and then click on the pager to navigate to the next or previous
record. Before this commit, a notification was displayed (because
a required field is unset), but we switched to the other record
anyway.

This commit restores the desired behavior, which is to stay on the
current record to let the user fix it or discard it.

closes odoo/odoo#100050

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:41 +02:00
Aaron Bohy 8f58b1c768 [FIX] web: actionService: do not allow to leave invalid form
From a (e.g.) list view, click on "Create". In the form view, fill
in some fields, but leave a required field empty. Click on the
breadcrumbs to come back to the list. Before this commit, a
notification was displayed (because some required fields are
unset), but we left the form to come back to the list anyway.

The desired behavior is to stay on the form view, and display a
notification indicating that some fields are invalid.

In legacy views, we rejected promises to indicate that we couldn't
leave. This is a pattern we tried not to use anymore in new code.
Instead, we return a promise (if the method is async obviously)
which resolves to a boolean value, indicating if it works or not.
As a consequence, the action service wasn't properly dealing with
new views, as the promises they return always resolve.

This commit fixes the issue by adapting the code in the action
service.

Part-of: odoo/odoo#100050
2022-09-13 13:53:41 +02:00
Aaron Bohy 69a72aa4e1 [FIX] web: Many2ManyField: use correct title in dialog
Before this commit, the title of the SelectCreateDialog opened
when clicking on "Add a line" in a Many2ManyField was always
"Select Records" (the default value), whereas in this case, we
want to see "Add: something", where `something` is the `string`
attribute of the field (which can be overriden by an attrs on the
field node in the arch). This commit restores the desired behavior.

closes odoo/odoo#100046

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:36 +02:00
Aaron Bohy c313c25ff1 [FIX] web: x2many: send field context to x2many dialogs
Have a x2ManyField displayed as a (non-editable) list view, and
with a context defined on the x2m field node in the arch. Before
this commit, this context wasn't propagated to the dialog opened,
for instance, when adding a new record. It is now the case.

To make the tests pass, we also needed to make a slight change in
the BasicModel, as it didn't correctly process the context when
adding a new record with additional contexts (e.g. in x2many list
views with custom `<creates>`.

closes odoo/odoo#100000

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:30 +02:00
FrancoisGe 194dbc8a0d [IMP] web: export graph helper clickOnDataset
closes odoo/odoo#100030

Related: odoo/enterprise#31191
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-09-13 13:53:24 +02:00
luvi e63c2adca0 [FIX] web: fix style of CopyClipboard fields
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

closes odoo/odoo#99991

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-13 11:31:27 +02:00
Julien Mougenot 55f30554ea [FIX] web: Kanban columns are created at correct position
Before this commit, quick creating a column in a kanban view would not
necessarily put it at the right index.

Now, after creating a new kanban column, the columns are immediatly
resequenced to have a consistent order.

closes odoo/odoo#99347

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-13 11:31:17 +02:00
Audric Onockx (auon) 927ec413c5 [IMP] web: allow Record override
With this fix, it will be possible to override Record.

Part-of: odoo/odoo#97739
2022-09-13 07:37:56 +02:00
Samuel Degueldre 01aaca36b7 [FIX] web: log source of QUnit test failures in info instead of error
This allows easier parsing of the logs for indeterministic errors, so
that when the same error happens in different build, it has the same
error message, as the stack trace contains the file name of the assets
which get generated with a different hash every time, while also
preserving the existence of potentially useful tracebacks to debug
indeterministic issues.

closes odoo/odoo#100028

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-12 17:33:48 +02:00
Aaron Bohy 91e242e1c7 [FIX] web: kanban grouped by date: display None if not set
Before this commit, `false` was displayed as column title in kanban
views grouped by date(time) fields, for the column containing
records with unset value. When grouped by relational and date(time)
fields, we expect `None` to be displayed. This commit restores the
legacy behavior.

closes odoo/odoo#100020

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-12 17:33:35 +02:00
Aaron Bohy 1fb3882cd4 [FIX] web: kanban: display no content helper
The no content helper logic (determining when it is displayed) in
kanban is quite complicated. Apparently, in a kanban view grouped
on a field that isn't a many2one, with no groups (and thus no
records), and where we don't have the "group_create" permission,
we want the no content helper to be displayed. At least, this is
how it used to work in the legacy kanban view. This commit restores
the previous behavior and encodes this situation in a test. In the
future, it would probably be a good idea to sit down and challenge
the corner cases of this feature.

closes odoo/odoo#99914

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 17:33:26 +02:00
William Braeckman 44cfa03587 [IMP] mrp: migrate mrp_documents_kanban to wowl2
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.

closes odoo/odoo#99769

Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-12 17:33:14 +02:00
stefanorigano (SRI) f9a0d656a3 [REF] website_sale: improve overall navigation
task-2907955

closes odoo/odoo#98558

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-12 15:30:45 +02:00
stefanorigano (SRI) 46e5387974 [REF] website: multirange input
This commit improve the design and simplify the implementation.
Popovers have been removed and the overall integration with boostrap is
increased allowing customization with the default boostrap variables.

Variables for (multi-)range input have been exposed at "theme-level"
allowing to customize these components when creating a new theme.

task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:44 +02:00
stefanorigano (SRI) d16693b927 [IMP] web, website, website_sale, sale: checkbox/radio design
Improve checkbox/radio design and the overall consistency, removing
'website_sales' overrides and defining `:hover` behaviors globally.

The odoo 'css_attribute_color' field has been adapted too in order to
match user's fields customization.

task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:43 +02:00
Victor Feyens 74aec75de9 [FIX] web: legacy fields
If the source field widget emitting a field_changed event is a m2o,
the field changes of the event will all be considered
as changes targeting a m2o and converted accordingly, resulting in
server errors because the `onchange` call received a [None, None] value
for a standard field (e.g. float).

closes odoo/odoo#100007

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:49 +02:00
Aaron Bohy 5f499d170e [FIX] web: apply default favorite even if active_id(s)
Before this commit, we didn't apply the default favorite (if any),
when there was an active_id or active_ids in the context. This was
a mistake. Note that it only impacted owl views.

closes odoo/odoo#99989

X-original-commit: 1e13e6cd073e57b3744caefc4b8f3795c35a4c10
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:37 +02:00
Florian Damhaut b3489af4c1 [FIX] web: basic_model: save a paged nested o2m
In a form view, have a o2m field (A), with a nested o2m field (B).
The A field should have multiple pages, with each record having at least one record
in their B field.

Have a (C) field that will modify a record in the nested o2m when changed.

Change the C field, and save.

Before this commit, the record's nested o2m from the other page had a wrong value
(a mere 4 command).

After this commit, their value is a command 4 and a command 1, with the right values.

closes odoo/odoo#99986

X-original-commit: e45e3b83f0f3116cc983c6bd8a9212e815b4d4f5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:31 +02:00