changeset 09b75e2f7ef5 in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=09b75e2f7ef5
description:
        Include id as argument of pre_validate calls

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

        issue10014
        review327031002
        (grafted from 2e64570bb1950bc873aec2d82dbcedd73533c79a)
diffstat:

 tryton/gui/window/view_form/model/record.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c5edd9487179 -r 09b75e2f7ef5 tryton/gui/window/view_form/model/record.py
--- a/tryton/gui/window/view_form/model/record.py       Mon Feb 01 22:55:20 
2021 +0100
+++ b/tryton/gui/window/view_form/model/record.py       Fri Jan 29 00:04:29 
2021 +0100
@@ -305,7 +305,7 @@
     def pre_validate(self):
         if not self.modified_fields:
             return True
-        values = self._get_on_change_args(self.modified_fields)
+        values = self._get_on_change_args(['id'] + list(self.modified_fields))
         try:
             RPCExecute('model', self.model_name, 'pre_validate', values,
                 context=self.get_context())

Reply via email to