this is my real code in wf_validates.py
from gluon import current class Validate(object): def status(self,table,field,row,db): wf=db.workflows(id=row[table]["workflow"])["workflow"] if wf in ["Ficheiros","Load","Pessoa"]: cb=getattr(eval("Ficheiros")(), "status"+"_"+"Draft")('xx','db') return cb else: return "" class Ficheiros(object): def status_Draft(self,row,db): db.log.insert(msg="status_draft") *session=current.session* this_time=datetime.datetime.utcnow() +datetime.timedelta(hours=-1)#session.utc) check_time=this_time.replace( hour=18, minute=0, second=0, microsecond=0 ) return this_time>check_time return True 2017-07-21 13:53 GMT+01:00 António Ramos <ramstei...@gmail.com>: > yes i have > > from gluon import current > > in my wf_validates.py > > 2017-07-21 13:39 GMT+01:00 Anthony <abasta...@gmail.com>: > >> Do you have the following in your module: >> >> from gluon import current >> >> Anthony >> >> -- >> 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 the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.