From 37f95838f26c2b9796bfd45e62fbb1d4df7ac6a6 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 18 Oct 2012 12:08:50 +0200 Subject: [PATCH] [FIX] Race condition bug inserted in Revision: 3245 revid:fme@openerp.com-20121016122951-hwm80wzmhnm8tlj5 bzr revid: fme@openerp.com-20121018100850-50fmnenx64f82151 --- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index add729ca8e8..131d0f535f1 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -246,6 +246,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var remaining = groups.length - 1, groups_array = []; return $.when.apply(null, _.map(groups, function (group, index) { + self.do_clear_groups(); var dataset = new instance.web.DataSetSearch(self, self.dataset.model, new instance.web.CompoundContext(self.dataset.get_context(), group.model.context()), group.model.domain()); return dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }) @@ -259,7 +260,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ }); })); }); - self.do_clear_groups(); }, do_process_dataset: function() { var self = this; @@ -267,6 +267,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ this.add_group_mutex.exec(function() { var def = $.Deferred(); self.dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }).then(function(records) { + self.do_clear_groups(); var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset); self.do_add_groups([kgroup]).then(function() { if (_.isEmpty(records)) { @@ -279,7 +280,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ }); return def; }); - self.do_clear_groups(); }, do_reload: function() { this.do_search(this.search_domain, this.search_context, this.search_group_by);