changeset 50a80eac8876 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=50a80eac8876
description:
        Set only fields in _loaded

        _loaded is compared with the model.fields so it should only contains 
existing
        field and no pseudo-field like _timestamp.

        issue8120
        review50771002
diffstat:

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

diffs (14 lines):

diff -r b606959c0829 -r 50a80eac8876 src/model.js
--- a/src/model.js      Tue Feb 26 15:47:57 2019 +0100
+++ b/src/model.js      Tue Feb 26 15:58:38 2019 +0100
@@ -774,8 +774,8 @@
             }
             return jQuery.when.apply(jQuery, promises.filter(Boolean))
                 .then(function() {
-                    for (name in values) {
-                        this._loaded[name] = true;
+                    for (var i = 0; i < fieldnames.length; i++) {
+                        this._loaded[fieldnames[i]] = true;
                     }
                     if (validate) {
                         return this.validate(fieldnames, true);

Reply via email to