changeset 5e7a595d73f4 in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset;node=5e7a595d73f4
description:
        Use field.set to set value from on_change calls

        Setting a reference field with an on_change in an editable list won't 
set the
        correct value for the model selection. We should do like in tryton and 
call
        set.

        issue9083
        review297071003
        (grafted from 2060bbe6cf44e1483d873f1d25301e5af15b6327)
diffstat:

 src/model.js |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r cd849c829475 -r 5e7a595d73f4 src/model.js
--- a/src/model.js      Sun Apr 12 23:21:08 2020 +0200
+++ b/src/model.js      Sat Apr 18 17:20:57 2020 +0200
@@ -1445,7 +1445,7 @@
             record._changed[this.name] = true;
         },
         set_on_change: function(record, value) {
-            record._values[this.name] = value;
+            this.set(record, value);
             record._changed[this.name] = true;
         },
         changed: function(record) {

Reply via email to