changeset 9d89c0c569a8 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=9d89c0c569a8
description:
        Include id as argument of pre_validate calls

        It is needed by the server to get value of field not modified.

        issue10014
        review327031002
diffstat:

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

diffs (13 lines):

diff -r 668481952aca -r 9d89c0c569a8 src/model.js
--- a/src/model.js      Mon Jan 25 15:32:57 2021 +0100
+++ b/src/model.js      Fri Jan 29 00:04:29 2021 +0100
@@ -1269,7 +1269,8 @@
             if (jQuery.isEmptyObject(this._changed)) {
                 return jQuery.Deferred().resolve(true);
             }
-            var values = this._get_on_change_args(Object.keys(this._changed));
+            var values = this._get_on_change_args(
+                Object.keys(this._changed).concat(['id']));
             return this.model.execute('pre_validate',
                     [values], this.get_context())
                 .then(function() {

Reply via email to