From a8bc251a9458167c05dc619e5d788942b737f289 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 6 Sep 2012 08:59:11 -0500 Subject: [PATCH] compted fields visible in SQLFORM(readonly=True) --- VERSION | 2 +- gluon/sqlhtml.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 6e83a18f..616fd3fe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.7 (2012-09-06 08:41:19) stable +Version 2.0.7 (2012-09-06 08:59:06) stable diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 928e24df..88c1f5bf 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -874,8 +874,9 @@ class SQLFORM(FORM): # if no fields are provided, build it from the provided table # will only use writable or readable fields, unless forced to ignore if fields is None: - fields = [f.name for f in table if ( - ignore_rw or f.writable or f.readable) and not f.compute] + fields = [f.name for f in table if + (ignore_rw or f.writable or f.readable) and + (readonly or not f.compute)] self.fields = fields # make sure we have an id