fields with readable=False should not be exportable from grid

This commit is contained in:
mdipierro
2013-10-04 00:16:30 -05:00
parent 5be65e8bd4
commit 7eb67fe6fa
2 changed files with 7 additions and 4 deletions

View File

@@ -1 +1 @@
Version 2.6.4-stable+timestamp.2013.10.03.08.39.06
Version 2.6.4-stable+timestamp.2013.10.04.00.15.28

View File

@@ -1921,13 +1921,16 @@ class SQLFORM(FORM):
fields = []
columns = []
for table in tables:
fields += [f for f in table]
columns += [f for f in table]
for k,f in table.iteritems():
if isinstance(f,Field.Virtual) and f.readable:
if isinstance(f,Field):
fields.append(f) # these are selected
if f.readable:
columns.append(f) # these are displayed/exported
elif isinstance(f,Field.Virtual) and f.readable:
f.tablename = table._tablename
columns.append(f)
fields.append(f)
if not field_id:
if groupby is None:
field_id = tables[0]._id