[IMP] kanban view:- fix problem of multiple time reload view on button click.
authorYogesh (OpenERP) <ysa@tinyerp.com>
Wed, 10 Aug 2011 11:58:56 +0000 (17:28 +0530)
committerYogesh (OpenERP) <ysa@tinyerp.com>
Wed, 10 Aug 2011 11:58:56 +0000 (17:28 +0530)
bzr revid: ysa@tinyerp.com-20110810115856-6il0cx3pg2tvxvqp

addons/base_kanban/static/src/js/kanban.js

index dcfb2f5..2bb5b84 100644 (file)
@@ -127,10 +127,14 @@ openerp.base_kanban.KanbanView = openerp.base.View.extend({
         this.execute_action(
             button_attrs, this.dataset, this.session.action_manager,
             record_id, function () {
+                var count = 1;
                 _.each(self.all_display_data, function(data, index) {
                     self.dataset.read_ids( data.ids, [], function(records){
                         self.all_display_data[index].records = records;
-                        self.on_reload_kanban();
+                        if(self.all_display_data.length == count) {
+                            self.on_reload_kanban();
+                        }
+                        count++;
                     });
                 });
             }