From 96254074d75c2420eebc43bba5ca4f24ee536eb7 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Fri, 19 Oct 2012 16:23:04 +0530 Subject: [PATCH] [FIX] reconcile view: use backbone event architecture, remove .add bzr revid: rgaopenerp-20121019105304-9ddz8q763prmxdg0 --- .../static/src/js/account_move_reconciliation.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index e8bf24fb27f..100ac3b66b9 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -11,15 +11,15 @@ openerp.account = function (instance) { this._super.apply(this, arguments); var self = this; this.current_partner = null; - this.do_select.add(function() { - if (self.get_selected_ids().length === 0) { + this.on('record_selected', this, function(ids, records) { + if (ids.length === 0) { self.$(".oe_account_recon_reconcile").attr("disabled", ""); } else { self.$(".oe_account_recon_reconcile").removeAttr("disabled"); } }); }, - on_loaded: function() { + load_list: function() { var self = this; var tmp = this._super.apply(this, arguments); if (this.partners) { @@ -121,6 +121,10 @@ openerp.account = function (instance) { self.do_search(self.last_domain, self.last_context, self.last_group_by); }); }, + do_select: function (ids, records) { + this.trigger('record_selected', ids, records) + this._super.apply(this, arguments); + }, }); };