From 365c2a60d372a197ea4416137e00f7d9ef86bf32 Mon Sep 17 00:00:00 2001 From: msh-openerp Date: Thu, 12 Apr 2012 11:11:34 +0530 Subject: [PATCH 1/3] [FIX]Fixed the issue of kanban view show more records, here the ids were not updated in dataset, so it was giving error of id. bzr revid: msh@tinyerp.com-20120412054134-oen4gir0j93gllp7 --- addons/web_kanban/static/src/js/kanban.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index d04622b7058..96e0d1bf9c1 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -305,6 +305,7 @@ openerp.web_kanban.KanbanGroup = openerp.web.OldWidget.extend({ this.$records = null; this.records = []; + this.ids = []; this.$has_been_started.then(function() { self.do_add_records(records); }); @@ -347,7 +348,9 @@ openerp.web_kanban.KanbanGroup = openerp.web.OldWidget.extend({ var rec = new openerp.web_kanban.KanbanRecord(self, record); rec.insertBefore(self.$records.find('.oe_kanban_show_more')); self.records.push(rec); + self.ids.push(rec.id); }); + this.view.dataset.ids = _.union(this.view.dataset.ids, self.ids); this.$records.find('.oe_kanban_show_more').toggle(this.records.length < this.dataset.size()) .find('.oe_kanban_remaining').text(this.dataset.size() - this.records.length); }, From c6c1daf28d8734f0b75e80d7ca85b0cca964d678 Mon Sep 17 00:00:00 2001 From: msh-openerp Date: Fri, 8 Jun 2012 13:05:16 +0530 Subject: [PATCH 2/3] [FIX]Refixed the issue of kanban view, show more button, which was giving an error of id, here added an id if the id is not available in dataset. bzr revid: msh@tinyerp.com-20120608073516-v0wa94fuiy9jysec --- addons/web_kanban/static/src/js/kanban.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 96e0d1bf9c1..2e1a74abc20 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -305,7 +305,6 @@ openerp.web_kanban.KanbanGroup = openerp.web.OldWidget.extend({ this.$records = null; this.records = []; - this.ids = []; this.$has_been_started.then(function() { self.do_add_records(records); }); @@ -348,9 +347,7 @@ openerp.web_kanban.KanbanGroup = openerp.web.OldWidget.extend({ var rec = new openerp.web_kanban.KanbanRecord(self, record); rec.insertBefore(self.$records.find('.oe_kanban_show_more')); self.records.push(rec); - self.ids.push(rec.id); }); - this.view.dataset.ids = _.union(this.view.dataset.ids, self.ids); this.$records.find('.oe_kanban_show_more').toggle(this.records.length < this.dataset.size()) .find('.oe_kanban_remaining').text(this.dataset.size() - this.records.length); }, @@ -392,6 +389,9 @@ openerp.web_kanban.KanbanRecord = openerp.web.OldWidget.extend({ }, set_record: function(record) { this.id = record.id; + if(!(this.id in this.view.dataset.ids)){ + this.view.dataset.ids.push(this.id) + } this.record = this.transform_record(record); }, start: function() { From 4d26d84178c0804e139fdb1627ea353b16980a2c Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Sun, 15 Jul 2012 14:55:12 +0530 Subject: [PATCH 3/3] [FIX]Refixed the issue. bzr revid: msh@openerp.com-20120715092512-11o2lapgvwasmkm8 --- addons/web_kanban/static/src/js/kanban.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 07845c40d3b..b9012e16b39 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -387,7 +387,7 @@ openerp.web_kanban.KanbanRecord = openerp.web.OldWidget.extend({ }, set_record: function(record) { this.id = record.id; - if(!_(this.view.dataset.ids).contains(this.id)){ + if(!_(this.view.dataset.ids).contains(this.id)) { this.view.dataset.ids.push(this.id) } this.record = this.transform_record(record);