From 8c0b2bece7fbb12328cc3902b2cb0ec77efc3360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 5 Apr 2018 19:14:08 +0200 Subject: [PATCH] Use Screen.load when opening Window.Form in Many2Many The changeset 4392ca20106e changed the order of the calls to group.load and set_group. So no current_record was set when Window.Form was called. issue7278 review47271002 --- src/view/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/form.js b/src/view/form.js index f0d85cf40f..90dcb91621 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -3436,7 +3436,6 @@ function eval_pyson(value){ // Create a new screen that is not linked to the parent otherwise // on the save of the record will trigger the save of the parent var screen = this._get_screen_form(); - screen.new_group([this.screen.current_record.id]); var callback = function(result) { if (result) { screen.current_record.save().done(function() { @@ -3446,6 +3445,7 @@ function eval_pyson(value){ } }.bind(this); screen.switch_view().done(function() { + screen.load([this.screen.current_record.id]); new Sao.Window.Form(screen, callback, {title: this.attributes.string}); }.bind(this));