From f9e158b74cd5e2a1836f0f54b0e93bbab0dba83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 20 Apr 2011 14:27:52 +0200 Subject: [PATCH] Manage _timestamp when reading Singleton that has not yet a record --- trytond/model/modelsingleton.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/model/modelsingleton.py b/trytond/model/modelsingleton.py index b1aa2200a0..f90d90993f 100644 --- a/trytond/model/modelsingleton.py +++ b/trytond/model/modelsingleton.py @@ -87,6 +87,9 @@ class ModelSingleton(ModelStorage): return res def default_get(self, fields_names, with_rec_name=True): + if '_timestamp' in fields_names: + fields_names = list(fields_names) + fields_names.remove('_timestamp') res = super(ModelSingleton, self).default_get(fields_names, with_rec_name=with_rec_name) singleton_id = self.get_singleton_id()