Skip to content

Commit 5030d9b

Browse files
nicoeJCavallo
andauthored
Return Screen's display promise when creating a new one [PREVIEW] (#291)
* Revert "Fetch missing key definition in Record.set_on_change [PREVIEW] (#274)" This reverts commit 494a6d3. * Return Screen's display promise when creating a new one [PREVIEW] Returning this promise ensure the correct scheduling of the promises when a wizard contains an x2M widgets that will create a new Sao.Model which will receive later its fields definition while the on_change will trigger the process to set the record's values. --------- Co-authored-by: Jean Cavallo <jean.cavallo@hotmail.fr>
1 parent cea55ca commit 5030d9b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sao/src/screen.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,10 +1619,9 @@
16191619
if (previous_view.view_type == 'calendar') {
16201620
previous_view.set_default_date(record, selected_date);
16211621
}
1622-
this.display().done(() => {
1622+
return this.display().done(() => {
16231623
this.set_cursor(true, true);
16241624
});
1625-
return record;
16261625
});
16271626
});
16281627
},

sao/src/wizard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
this.context.active_ids = this.ids;
3939
this.context.active_model = this.model;
4040
this.context.action_id = this.action_id;
41-
return Sao.rpc({
41+
Sao.rpc({
4242
'method': 'wizard.' + this.action + '.create',
4343
'params': [this.session.context]
4444
}, this.session).then(result => {

0 commit comments

Comments
 (0)