From 68aac8e85515f69b98492fd4c20a62004086595a Mon Sep 17 00:00:00 2001 From: Michel Meyer Date: Mon, 9 Dec 2013 16:35:19 +0100 Subject: [PATCH] [FIX] events handling ordering courtesy of Michel Meyer lead to errors during the validation of rows in list o2ms. See https://bugs.launchpad.net/openerp-web/+bug/1182101/comments/20 for an extensive description of the events and issue. bzr revid: xmo@openerp.com-20131209153519-n05bdx15t75dh7gf --- addons/web/static/src/js/view_form.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 080cd6f70aa..3893626520f 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3822,7 +3822,6 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ GroupsType: instance.web.form.One2ManyGroups, ListType: instance.web.form.One2ManyList })); - this.on('edit:before', this, this.proxy('_before_edit')); this.on('edit:after', this, this.proxy('_after_edit')); this.on('save:before cancel:before', this, this.proxy('_before_unedit')); @@ -3943,11 +3942,10 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ }); }, - _before_edit: function () { + _after_edit: function () { this.__ignore_blur = false; this.editor.form.on('blurred', this, this._on_form_blur); - }, - _after_edit: function () { + // The form's blur thing may be jiggered during the edition setup, // potentially leading to the o2m instasaving the row. Cancel any // blurring triggered the edition startup here