Commit Graph
15413 Commits
Author SHA1 Message Date
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
Simon Genin (ges) 6ab02de109 [REF] base_setup: convert module to new js framework
convert res_config_dev_tool widget
convert res_config_edition widget
convert res_config_invite_users widget

closes odoo/odoo#96615

Related: odoo/enterprise#29804
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:45 +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
Xavier Morel e75f2989b4 [FIX] core, web: Pillow 9.1 deprecations
Pillow 9.1 deprecates most if not all toplevel Image constants:
https://pillow.readthedocs.io/en/stable/releasenotes/9.1.0.html#constants

These constants have been moved to thematic enum classes (e.g. all the
resampling constants in `PIL.Image.Resampling`).

This triggers warnings in Odoo, and the removal delay is quite short
(slated for Pillow 10, release planned mid 2023). Pillow 9.1 is also
already in Debian Bookworm (current testing).

Fix by shimming at the import level: if the enums are available import
them into the local namespace, otherwise alias `PIL.Image` itself as
to the enum.

closes odoo/odoo#96799

X-original-commit: 7be04d31bad078681ef0a2919234c11840a2e8e2
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-07-28 02:40:23 +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
Xavier-Do 555ef06fa5 [IMP] tests: allow to disable auto retry
Auto retry can be usefull to avoid breaking a build because of a
small tour or query count, but for long tests like qunit, this can be
painfull when a real error is triggered.

This commit proposes to disable autoretry on demand for some tests
to solve this issue.

This may be applied on all tests longer than a few seconds.

closes odoo/odoo#95440

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-07-27 16:33:56 +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
Lucas Perais 03bd13e4c0 [FIX] web: legacy list switches view to form with the right resIds
Have a legacy list view, click on a record to open it in a new (WOWL) form view
Before this commit, the pager was wrong, as we never passed the list's current resIds
to the form.

After this commit, the pager of the wowl form view is correct.

closes odoo/odoo#96123

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-07-25 20:12:38 +02:00
Samuel Degueldre 57d97752a2 [FIX] web: use color-contrast instead of color-yiq
Previously, we were using the bootstrap 4 function "color-yiq" to choose
a text color depending on the background color. Since the migration to
BS5, color-yiq is no longer valid, and color-contrast should be used
instead, but the wowl-views migration was maintained in parallel from
the BS5 migration and some instance of this function call were added
back with it. This commit fixes those.

Functionally, this fixes the text color in the m2m_tags field.

closes odoo/odoo#96598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-25 16:34:10 +02:00
Samuel Degueldre 19d0a92b2c [REF] web: remove useless statusbar css rules from form view css
These rules no longer apply because they use a direct descendant
selector which no longer matches since field widgets now have an extra
div. These rules also already exist in the statusbar_field.scss file.

Part-of: odoo/odoo#96598
2022-07-25 16:34:09 +02:00
Samuel Degueldre 4c2dff9205 [FIX] web: fix enterprise badge in settings being hidden and wrong color
After the bootstrap migration, the enterprise badge in the settings view
were the wrong color because the class bg-primary was not adapted. This
commit fixes that.

After the wowl views merge, the badge has become hidden behind the
navbar, because it can no longer modify the DOM of its label as it is
managed by owl. When there is no label, the widget appends the badge to
its own $el, and uses position: absolute to position it. This didn't
work because the closest parent that was positioned was the view itself.
This commit fixes that by giving a position: relative to the settings
box.

closes odoo/odoo#96580

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-25 16:34:01 +02:00
Samuel Degueldre e9b9f6520f [REF] web: move settings css rules to the correct file
The css rules for the settings view should be in the corresponding css
file, not with the generic form view rules. This commit moves these
rules to the proper files and unnests some rules when the selectors are
specific enough, which generates less CSS.

Part-of: odoo/odoo#96580
2022-07-25 16:34:01 +02:00
FrancoisGe 263bef0737 [FIX] web: ListView use the correct label
This commit solves 2 problems in the list view:
- incorrect label for a column
- the label in the optional column dropdown can be different than
  the label of the displayed column

When converting the list view, we used the displayName of the widget
and not its label.

In order to improve the consistency between the labels in the optional
column dropdown and the associated columns, we decided to use the same
label.

closes odoo/odoo#96408

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-25 16:33:49 +02:00
Abdelouahab (abla) d86ed180a6 [FIX] web : fix bg for bold document layout
To reproduce
============

on settings -> document layout -> choose Bold with blank background.
print a document (quotation for example) that has at least 2 pages.
the second page of the document has a background.

Purpose
=======

the issue is caused by the condition :
https://github.com/odoo/odoo/blob/0436709f33e57479bd6d62c2e0a2de74743cbaa4/addons/web/views/report_templates.xml#L403
where we don't take into account the case where no background is set.

Specification
=============

to solve the issue the condition was corrected

opw-2888650

closes odoo/odoo#96528

X-original-commit: bf2ce0aa0c7d45c90d7ff104d5af5f99b29d59ae
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-22 16:22:02 +02:00
Sébastien Theys 28200c5ad5 [IMP] mail, web: adapt chatter container in new form
task-2871070

Part-of: odoo/odoo#78221
2022-07-22 16:21:45 +02:00
+2 bc0a0cead6 [IMP] web,*: enable owl list & form views
The new list and form views were merged recently [1], but they
weren't activated because they weren't 100% ready yet. This is now
the case. This commit adds those views to the view registry. As a
consequence, a lot of qunit tests and tours needed to be adapted,
mostly for selector changes.

We also add legacy list and form views to the view registry, with
keys 'legacy_list' and 'legacy_form'. This allows to force those
legacy views when necessary. For instance, we did it in views
using complex custom legacy x2many field widgets that haven't been
converted yet (we have a compatibility layer but it isn't complete
and doesn't support every advanced usecases).

[1] odoo/odoo#92475

Part-of: odoo/odoo#78221
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
2022-07-22 16:21:45 +02:00
Jorge Pinna Puissant 6994ccb31f [IMP] web: BasicModel: improve the performance of context eval
Before this commit, the evaluation of the context was done for all
the context, even when only a subset of the context was needed.

Now, we evaluate only the attributes of the context that are used.

Part-of: odoo/odoo#78221
2022-07-22 16:21:45 +02:00
Géry Debongnie 5329b9a9ae [IMP] web: prevent toPyDict from iterating on keys
The `toPyDict` method is used to transform an object into a "python" dictionary,
by returning an equivalent object with the PY_DICT object in the prototype chain.
In practice, it is called everytime we create an evaluation context.

This is a performance problem, since creating the context is not cheap in the
case of Odoo form views: we need to iterate on all the values of the current
record, checking for each changes, applying all relational operations, ...
And even worse, almost all of the domains that we need to evaluate have very
simple conditions, which just needs to check the value of one field. So, it is
useful to make the computation of the eval context keys lazy, and this commit
make sure that pyjs does not undo the lazyness of the eval context, if any.

Part-of: odoo/odoo#78221
2022-07-22 16:21:45 +02:00
Mathieu Duckerts-Antoine c5a8c4414c [FIX] web: load legacy x2many subviews
In a view form, legacy x2many fields with no view inline would not have
their subviews loaded. We fix that.

Part-of: odoo/odoo#78221
2022-07-22 16:21:44 +02:00
Mathieu Duckerts-Antoine 1d61d68207 [FIX] web: processing of field mode attribute
The view mode in which to display a legacy x2many field in a new form
view was badly processed. This lead those fields to be not renderered at
all (no list or kanban renderer displayed) or be renderered with the
wrong renderer in mobile mode. We fix that.

Part-of: odoo/odoo#78221
2022-07-22 16:21:44 +02:00
Mathieu Duckerts-Antoine 182b241e7d [IMP] web: support of fieldDependencies
Sometimes a field component might need to know some other fields values
to render itself or for other purposes. In legacy, a mechanism allowing
to load some field values not displayed was available: a field would
declare a fieldDependencies object specifying some field names and
their types and the related values would be loaded along the other data.

Here we introduce the same mechanism for the new views.

Note that in a new view list, the tag widget is not currently supported
so that we have remove some lines in the list arch parser that were
useless.

Part-of: odoo/odoo#78221
2022-07-22 16:21:44 +02:00
FrancoisGe ce61a35cf8 [FIX] web: crash when an arch as tree inside another tree
Before this commit, if an arch contained a tree which itself contained
a tree, the parser would crash.

The reason for this crash is that the parser was trying to parse the
second tree with the model of the first. So it didn't know the fields.

The solution is to stop the exploration of children when it is not
necessary. For example, for fields, it is not necessary to explore
the children, it is parseFieldNode that takes care of it.

Part-of: odoo/odoo#78221
2022-07-22 16:21:44 +02:00