changeset 339f2332f9cc in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=339f2332f9cc
description:
Disable cache on default_get of ModelSingleton
The default_get is used by the clients as a read method to fill the
form on
opening.
issue9045
review282931003
diffstat:
trytond/model/modelsingleton.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r f816cd0d481f -r 339f2332f9cc trytond/model/modelsingleton.py
--- a/trytond/model/modelsingleton.py Sat Feb 15 01:36:48 2020 +0100
+++ b/trytond/model/modelsingleton.py Sat Feb 15 01:43:11 2020 +0100
@@ -10,6 +10,12 @@
"""
@classmethod
+ def __setup__(cls):
+ super().__setup__()
+ # Cache disable because it is used as a read by the client
+ cls.__rpc__['default_get'].cache = None
+
+ @classmethod
def get_singleton(cls):
'''
Return the instance of the unique record if there is one.