From 8112d78bdd89429b41bf4fa2465667a2c05df0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 16 Jan 2010 14:24:26 +0100 Subject: [PATCH] Ignore Fields that starts with "_" --- CHANGELOG | 1 + trytond/model/model.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a30fce3b43..b24c47208a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Ignore Fields that starts with "_" * Add comment on table and field for postgresql backend * Remove egenix-mx-base and replace it by python-dateutil * Add cache to safe_eval diff --git a/trytond/model/model.py b/trytond/model/model.py index d0ce7405db..0beb1f7c62 100644 --- a/trytond/model/model.py +++ b/trytond/model/model.py @@ -37,7 +37,7 @@ class Model(object): return self.__columns res = {} for attr in dir(self): - if attr in ('_columns', '_defaults', '_xxx2many_targets'): + if attr.startswith('_'): continue if isinstance(getattr(self, attr), fields.Field): res[attr] = getattr(self, attr)