I think i found the problem.... the edit button calls http://myapp/empre/default/trabalhador/edit/t_docs/1398?_signature=2f406825cb013a61bc68879efade7d728c63370b but the trabalhador function is not expecting the edit arg...
i have to rewind my head to the docs again... 2016-05-13 22:31 GMT+01:00 António Ramos <[email protected]>: > web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 > Python Python 2.7.9: /usr/local/bin/python (prefix: /usr/local)Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13. > 14. > > Traceback (most recent call last): > File "/home/ramstein74/webapps/2py/web2py/gluon/restricted.py", line 220, > in restricted > exec ccode in environment > File > "/home/ramstein74/webapps/2py/web2py/applications/empre/controllers/default.py" > <https://empre.cires.pt/admin/default/edit/empre/controllers/default.py>, > line 1872, in <module> > File "/home/ramstein74/webapps/2py/web2py/gluon/globals.py", line 385, in > <lambda> > self._caller = lambda f: f() > File "/home/ramstein74/webapps/2py/web2py/gluon/tools.py", line 3287, in f > return action(*a, **b) > File > "/home/ramstein74/webapps/2py/web2py/applications/empre/controllers/default.py" > <https://empre.cires.pt/admin/default/edit/empre/controllers/default.py>, > line 1603, in trabalhador > person=db.trabalhador[query] > File "/home/ramstein74/webapps/2py/web2py/gluon/dal.py", line 8912, in > __getitem__ > return ogetattr(self, str(key)) > AttributeError: 'Table' object has no attribute 'edit' > > Error snapshot [image: help] > <https://empre.cires.pt/admin/default/ticket/empre/194.65.91.147.2016-05-13.15-46-31.fe4a36d0-1c23-4d5f-8721-cf254f8d7779#> > > <type 'exceptions.AttributeError'>('Table' object has no attribute 'edit') > > inspect attributes > Frames > > - > > *File /home/ramstein74/webapps/2py/web2py/gluon/restricted.py in > restricted at line 220* código argumentos variáveis > - > > *File > > /home/ramstein74/webapps/2py/web2py/applications/empre/controllers/default.py > in <module> at line 1872* código argumentos variáveis > - > > *File /home/ramstein74/webapps/2py/web2py/gluon/globals.py in <lambda> > at line 385* código argumentos variáveis > - > > *File /home/ramstein74/webapps/2py/web2py/gluon/tools.py in f at line > 3287* código argumentos variáveis > - > > *File > > /home/ramstein74/webapps/2py/web2py/applications/empre/controllers/default.py > in trabalhador at line 1603* código argumentos variáveis > - > > *File /home/ramstein74/webapps/2py/web2py/gluon/dal.py in __getitem__ > at line 8912* código argumentos variáveis > Function argument list > > (self=<Table trabalhador > > (id,status,situation,check_po...sible,obs,anual,residente,updated,visit_counter)>, > key='edit') > Code listing > > 8907. > 8908. > 8909. > 8910. > 8911. > 8912. > > 8913. > 8914. > 8915. > 8916. > > query = self._build_query(key) > return self._db(query).select(limitby=(0, 1), > orderby_on_limitby=False).first() > elif str(key).isdigit() or 'google' in DRIVERS and isinstance(key, > Key): > return self._db(self._id == key).select(limitby=(0, 1), > orderby_on_limitby=False).first() > elif key: > return ogetattr(self, str(key)) > > > def __call__(self, key=DEFAULT, **kwargs): > for_update = kwargs.get('_for_update', False) > if '_for_update' in kwargs: > > Variables > builtinstr <type 'str'> > self <Table trabalhador > > (id,status,situation,check_po...sible,obs,anual,residente,updated,visit_counter)> > global ogetattr <slot wrapper '__getattribute__' of 'object' objects> > key 'edit' > > > 2016-05-13 17:10 GMT+01:00 Anthony <[email protected]>: > >> And let's see the full traceback. >> >> On Friday, May 13, 2016 at 11:18:30 AM UTC-4, Ramos wrote: >>> >>> i had editable=False and got that error when changing to True >>> >>> [image: Imagem inline 1] >>> >>> >>> 2016-05-13 16:02 GMT+01:00 Anthony : >>> >>>> More code... >>>> >>>> >>>> On Friday, May 13, 2016 at 10:21:53 AM UTC-4, Ramos wrote: >>>>> >>>>> Hi all >>>>> I just added >>>>> editable=True to a sqlform.grid >>>>> >>>>> but i get the error >>>>> >>>>> 'Table' object has no attribute 'edit' >>>>> >>>>> when i press the edit button >>>>> >>>>> >>>>> Any help ? >>>>> >>>>> >>>>> Thank you >>>>> >>>>> António >>>>> >>>>> -- >>>> 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 [email protected]. >>>> 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 [email protected]. >> 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

