From 2726edc6b0a623c4d2aecdf321778c0318001e7d Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 11 May 2015 11:20:24 +0200 Subject: [PATCH] [FIX] web: x2many: can't save document if a lines is removed with an ohter activate line. The widget try to blur a second time when the user click on save (need to check if allready blurred) --- addons/web/static/src/js/views/form_relational_widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 81752617940..7dacdb1d1fe 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -1062,7 +1062,7 @@ var One2ManyListView = ListView.extend({ }, _on_blur_one2many: function (force) { var self = this; - var def; + var def = $.when(); if (this.__ignore_blur && !force) { this.__ignore_blur = false; @@ -1074,7 +1074,7 @@ var One2ManyListView = ListView.extend({ if (this.editor.form.is_dirty()) { def = this.ensure_saved(); - } else { + } else if (this.editor.record) { def = this.cancel_edition(); }