From d8a0577e02f7d3da8e6537591ea4b7420e34099b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 24 Oct 2020 13:14:55 +0200 Subject: [PATCH] Keep record added/modified after cancel from popup window We need to keep the record modified to ensure that it is added to the xxx2Many on save. issue9298 review296601002 --- src/window.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/window.js b/src/window.js index fd63597139..a5bebaecfa 100644 --- a/src/window.js +++ b/src/window.js @@ -455,6 +455,7 @@ !readonly && this.screen.current_record) { result = false; + var added = this.screen.current_record._changed.id; if ((this.screen.current_record.id < 0) || this.save_current) { cancel_prm = this.screen.cancel_current( this._initial_value); @@ -462,6 +463,9 @@ this.screen.current_record.cancel(); cancel_prm = this.screen.current_record.reload(); } + if (added) { + this.screen.current_record._changed.id = added; + } } else { result = response_id != 'RESPONSE_CANCEL'; }