[REF] web_kanban: allow a custom limit defined in the arch
With this commit, it's now possible to set an arbitrary limit on any
kanban view by adding a limit attribut to the root kanban tag in a
kanban definition.
Do not forward-port.
Backport of rev 8a87c382ba
This commit is contained in:
@@ -66,7 +66,7 @@ var KanbanView = View.extend({
|
||||
this.qweb.default_dict = _.clone(QWeb.default_dict);
|
||||
|
||||
this.model = this.dataset.model;
|
||||
this.limit = options.limit || 40;
|
||||
this.limit = options.limit;
|
||||
this.grouped = undefined;
|
||||
this.group_by_field = undefined;
|
||||
this.default_group_by = undefined;
|
||||
@@ -84,6 +84,10 @@ var KanbanView = View.extend({
|
||||
},
|
||||
|
||||
view_loading: function(fvg) {
|
||||
if (!this.limit) {
|
||||
this.limit = parseInt(fvg.arch.attrs.limit, 10) || 40;
|
||||
}
|
||||
|
||||
this.$el.addClass(fvg.arch.attrs.class);
|
||||
this.fields_view = fvg;
|
||||
this.default_group_by = fvg.arch.attrs.default_group_by;
|
||||
|
||||
Reference in New Issue
Block a user