def approval():
response.title=" Quotes waiting approval "
response.view = 'Final/quotes/qapproval.html'
q_comm = db.quote.status == "Approval"
constraints = {'db.quote':q_comm}
form = SQLFORM.smartgrid(db.quote,constraints = constraints, linked_tables=['quoteitem'],deletable=dict(quote=False,quotelines=True), editable=dict(quote=True,quotelines=True), details=dict(quote=False,quotelines=False),create=dict(quote=False,quotelines=True),links = dict(quote=[lambda row: A(SPAN(_class='icol-accept'),_href=URL("quote","convert",args=[row.id]))]),csv=False)
return dict(form=form)
if auth.is_logged_in():
if not auth.has_membership('admin'):
db.quote._common_filter = lambda query: (db.quote.accmanager == auth.user_id) | (auth.user_id == 10) | (auth.user_id == 5)Glad to hear.
--
def view():
constraints={'created_by':auth.user_id}
grid=SQLFORM.smartgrid(db.posts,constraints=constraints)
return locals()
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/cNMqkf9hmKo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.