[FIX] web: Correctly transmit fields to the control panel

Before this commit, the "fields" object given to the control panel was
altered by the view (e.g. dashboard populates it with its aggregates).
As a result the control panel and its subcomponents had an altered
object with more or less fields than expected.

Now, the initial "fields" object is given to avoid such problems.

Task 2312074

closes odoo/odoo#55640

X-original-commit: 472b314614dc3dd9db880f4cb60c2eda89cce6b4
Related: odoo/enterprise#12310
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Julien Mougenot
2020-08-10 07:55:13 +00:00
parent f9ddf1b110
commit 90aa4b3ba4
@@ -241,7 +241,7 @@ var AbstractView = Factory.extend({
const controlPanelProps = {
action: params.action,
breadcrumbs: params.breadcrumbs,
fields: this.fields,
fields,
searchMenuTypes: params.searchMenuTypes,
view: this.fieldsView,
views: params.action.views && params.action.views.filter(