changeset 3b1589d79e45 in tryton:5.6
details: https://hg.tryton.org/tryton?cmd=changeset;node=3b1589d79e45
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 ca87184adb46 -r 3b1589d79e45 tryton/gui/window/view_form/model/record.py
--- a/tryton/gui/window/view_form/model/record.py       Mon Feb 01 22:53:33 
2021 +0100
+++ b/tryton/gui/window/view_form/model/record.py       Fri Jan 29 00:04:29 
2021 +0100
@@ -307,7 +307,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