changeset 1b9c383ad21a in tryton:5.2
details: https://hg.tryton.org/tryton?cmd=changeset;node=1b9c383ad21a
description:
        Add keys method on EvalEnvironment

        The keys method is used by domain inversion to test known fields.

        issue9199
        review305211002
        (grafted from 279c5387cb9b4d801069c20d9c648c6ef1dc8e18)
diffstat:

 tryton/common/environment.py |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 2b40f5336bd6 -r 1b9c383ad21a tryton/common/environment.py
--- a/tryton/common/environment.py      Sun Mar 15 16:51:15 2020 +0100
+++ b/tryton/common/environment.py      Fri Apr 10 18:27:39 2020 +0200
@@ -52,3 +52,9 @@
             return item in self.parent.get_eval()
         else:
             return item in self.parent.group.fields
+
+    def keys(self):
+        if self.eval_type == 'eval':
+            return self.parent.get_eval().keys()
+        else:
+            return self.parent.group.fields.keys()

Reply via email to