Subject: changeset in sao:4.2 Do not prevent to reset X2Many widget when no 
record is linked to the form
From: Nicolas Évrard <[email protected]>

changeset 850fb05753e8 in sao:4.2
details: https://hg.tryton.org/sao?cmd=changeset;node=850fb05753e8
description:
        Do not prevent to reset X2Many widget when no record is linked to the 
form

        It can occur when for example, you delete a record. The current code 
skipped
        the reset of the widget which made it stays filled.
        (grafted from 2062dcd560dbf4b32fe58fa15c9a7b4ecdc7b762)
diffstat:

 src/view/form.js |  6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diffs (23 lines):

diff -r 94a067914408 -r 850fb05753e8 src/view/form.js
--- a/src/view/form.js  Thu Jan 17 17:17:17 2019 +0100
+++ b/src/view/form.js  Wed Jan 23 14:37:31 2019 +0100
@@ -2562,9 +2562,6 @@
             this._set_button_sensitive();
 
             this.prm.done(function() {
-                if (!record) {
-                    return;
-                }
                 if (field === undefined) {
                     this.screen.new_group();
                     this.screen.set_current_record(null);
@@ -2941,9 +2938,6 @@
             Sao.View.Form.Many2Many._super.display.call(this, record, field);
 
             this.prm.done(function() {
-                if (!record) {
-                    return;
-                }
                 if (field === undefined) {
                     this.screen.new_group();
                     this.screen.set_current_record(null);

Reply via email to