changeset a963f1896290 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=a963f1896290
description:
        Add straight values to wizard state view

        issue11703
        review431591006
diffstat:

 src/wizard.js |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r a3d5b20cfaba -r a963f1896290 src/wizard.js
--- a/src/wizard.js     Sat Oct 01 14:44:34 2022 +0200
+++ b/src/wizard.js     Sat Oct 01 14:45:59 2022 +0200
@@ -73,9 +73,14 @@
                         this.update(view.fields_view, view.buttons);
 
                         this.screen.new_(false).then(() => {
-                            
this.screen.current_record.set_default(view.defaults);
-                            this.update_buttons();
-                            this.screen.set_cursor();
+                            this.screen.current_record.set_default(
+                                view.defaults || {})
+                                .then(() => {
+                                    this.screen.current_record.set(
+                                        view.values || {});
+                                    this.update_buttons();
+                                    this.screen.set_cursor();
+                                });
                         });
 
                         this.screen_state = view.state;

Reply via email to