From 4e7c1ae48aa10ecee816aaf3f70154fdd1c00a54 Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Sat, 2 Jun 2012 14:47:43 -0500 Subject: [PATCH] fixed issue 826, callable editable in grid, thanks Douglas --- VERSION | 2 +- gluon/sqlhtml.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 96db34a6..c0e349f0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-06-02 14:45:50) dev +Version 2.00.0 (2012-06-02 14:47:41) dev diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 78942d11..d5453412 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -1598,7 +1598,7 @@ class SQLFORM(FORM): def buttons(edit=False,view=False,record=None): buttons = DIV(gridbutton('buttonback', 'Back', referrer), _class='form_header row_buttons %(header)s %(cornertop)s' % ui) - if edit: + if edit and (not callable(edit) or edit(record)): args = ['edit',table._tablename,request.args[-1]] buttons.append(gridbutton('buttonedit', 'Edit', url(args=args)))