changeset eb2ba675a419 in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset;node=eb2ba675a419
description:
Wait the promises from set_on_change before calling display
The instance button call set_on_change to set the new value but some
fields
like xxx2Many returns a promises. We must wait for them before calling
display
otherwise the new values will not be rendered.
issue8595
review264101002
(grafted from 7ac8ce2c65a12e4927526d655367a9e99dda05ee)
diffstat:
src/screen.js | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (19 lines):
diff -r b0f4b3ba5a86 -r eb2ba675a419 src/screen.js
--- a/src/screen.js Sun Aug 25 13:01:53 2019 +0200
+++ b/src/screen.js Wed Aug 28 22:27:30 2019 +0200
@@ -1764,10 +1764,11 @@
var values = record._get_on_change_args(args);
return record.model.execute(attributes.name, [values],
this.context()).then(function(changes) {
- record.set_on_change(changes);
- record.group.root_group().screens.forEach(
- function(screen) {
- screen.display();
+ record.set_on_change(changes).then(function() {
+ record.group.root_group.screens.forEach(
+ function(screen) {
+ screen.display();
+ });
});
});
} else {