diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-03-17 11:11:42 +0100 |
|---|---|---|
| committer | Martin Geubelle <mge@odoo.com> | 2017-03-17 11:13:49 +0100 |
| commit | 22e7b6befb77005d1b1945977191ca11739f38fa (patch) | |
| tree | a62867de4aa02ba3a97da97cc28351be7fc3fe5b /addons | |
| parent | 5f9d382ed40cfc42d74dae799f241c0e79c97aed (diff) | |
[FIX] web_kanban: only give fields in view to record
This commit partially reverts 5b4f7c1 where `fields_view.fields`
had been replaced by `fields`, which could have been set to all
fields in the model.
This modification can sometimes lead to a problem, during the
fields value transformation. The ID, which wasn't given previously
is now parsed. When creating a new record, the field ID is not an
integer but a string (representing the virtual ID). If the field
is in the arch, it will be postprocessed
(see https://github.com/odoo/odoo/blob/saas-11/addons/web/static/src/js/framework/data_manager.js#L201)
and its type will become `id`. As this postprocessing is not done
if the field in the view, the parsing was on the original type
(integer) and not the special id type.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web_kanban/static/src/js/kanban_view.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_kanban/static/src/js/kanban_view.js b/addons/web_kanban/static/src/js/kanban_view.js index a0ed0761dcf..30a3517a7bc 100644 --- a/addons/web_kanban/static/src/js/kanban_view.js +++ b/addons/web_kanban/static/src/js/kanban_view.js @@ -376,7 +376,7 @@ var KanbanView = View.extend({ this.record_options = { editable: this.is_action_enabled('edit'), deletable: this.is_action_enabled('delete'), - fields: this.fields, + fields: this.fields_view.fields, qweb: this.qweb, model: this.model, read_only_mode: this.options.read_only_mode, @@ -427,7 +427,7 @@ var KanbanView = View.extend({ grouped_by_m2o: this.grouped_by_m2o, relation: this.relation, qweb: this.qweb, - fields: this.fields, + fields: this.fields_view.fields, quick_create: this._is_quick_create_enabled(), }; }, |
