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
This commit is contained in:
Cédric Krier committed 2018-04-05 19:14:08 +02:00
1 parent 927eaf7911
commit 8c0b2bece7
1 file changed
+1 -1
+1 -1
View File
@@ -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));