From 71ede66dce1b89ce3c2c9e1ff93c1e1cae2da397 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 18 Jul 2012 12:17:44 +0200 Subject: [PATCH] [FIX] handling of @onwrite extraction was broken: using _.bind/3 will partially apply the function (first argument) on top of binding it to a context (second argument), but the partial application will be from the *left* (which is pretty much the only one making sense, short of kwargs). handle_onwrite_record took its arguments the wrong way around: the partially applied one was specified on the right and the "actually applied" one was on the left, so it used the wrong argument and ended up blowing up the rest of the code. bzr revid: xmo@openerp.com-20120718101744-bbbshq60x2kqhob6 --- addons/web/static/src/js/view_list_editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index fa39329fc81..baff7085e0e 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -352,7 +352,7 @@ openerp.web.list_editable = function (instance) { _.bind(self.handle_onwrite_record, self, source_record))); }); }, - handle_onwrite_record: function (id, source_record) { + handle_onwrite_record: function (source_record, id) { var record = this.records.get(id); if (!record) { // insert after the source record