Files
odoo_source/addons/web
Aaron Bohy fa1906223f [FIX] web: FormView: add fieldDependencies to fields
Since [1], a call to getView no longer returns the all models the
list of all their fields, because a lot of them aren't necessary.

However, it caused an issue in the following situation:
 - have a form view with an x2many displayed as a list
 - in the list, have a field or widget with fieldDependencies
   (dependency on field A)
 - in the arch, the x2many form view isn't inline
 - in readonly mode, the user clicks on a row, which will open
   the x2many form view
 - since the form view isn't inline, a call to getView is done
 - in the returned form view, field A isn't present.

Since [1], it crashed at this point because A wasn't part of the
known fields in the form view (but it was in the activeFields,
since they are shared between the x2many list and form).

This commit fixes the issue by adding fieldDependencies not only
in activeFields, but also in fields if not already there.

[1] 4636620004

closes odoo/odoo#100495

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-19 20:59:08 +02:00
..
…