[FIX] web_kanban: has_active_field not always in view

When you do a group by on field that is not present in the view,
this.fields contains all the model's fields, not only the ones present
in the view.

As we use the method 'has_active_field' to check if the field active is
available in the view, the value is not always correct.

To fix this we take the fields_view fields instead of fields.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/5b4f7c13f32f36d86805eb7865d8a077746181d8
This commit is contained in:
Pierre Masereel
2017-04-13 13:57:43 +02:00
parent f830c7c3e3
commit c913398dab
@@ -303,7 +303,7 @@ var KanbanView = View.extend({
return this._super(action);
},
has_active_field: function() {
return this.fields.active;
return this.fields_view.fields.active;
},
_is_quick_create_enabled: function() {
if (!this.quick_creatable || !this.is_action_enabled('create'))