Use 'set' attribute to decide column for table_query

Since changeset 64681f657d55, Function fields have a sql_type so it is wrong to
rely on this property to use or not the field. The 'set' method of field is
already used in many places for this purpose.

issue4434
This commit is contained in:
Cédric Krier committed 2015-02-03 11:24:05 +01:00
1 parent bee8a500f8
commit 571ce9d117
1 file changed
+1 -3
+1 -3
View File
@@ -483,9 +483,7 @@ class SaleOpportunityHistory(ModelSQL, ModelView):
for name, field in cls._fields.iteritems():
if name in ('id', 'opportunity', 'date', 'user'):
continue
try:
field.sql_type()
except NotImplementedError:
if hasattr(field, 'set'):
continue
column = Column(opportunity_history, name)
columns.append(column.as_(name))