Can you please try the trunk version?
On Sunday, 30 September 2012 21:32:22 UTC-5, visuallinux wrote:
>
> Dear Massimo.
>
> My code is the following:
>
> @auth.requires_membership('Administrador')
> def clientes():
>
>
> class Virtual(object):
>
> @virtualsettings(label=T('Editar'))
> def edit(self):
>
> link_editar= URL(r =request,f='editablefunction',
> args=[self.clientes.id])
> link_icono_editar= IMG(_src=URL(r=request,c='static',
> f='images/Edit_Icon.png'),
> _alt='Editar'
> )
> return (A(link_icono_editar,_href= link_editar))# + str(
> self.clientes.id)))
>
> reg=db(db.clientes).select(db.clientes.id
> ,db.clientes.rut,db.clientes.dv,db.clientes.rsocial,
>
> db.clientes.direccion,db.clientes.ciudad,db.clientes.mail,
>
> db.clientes.tipo,db.clientes.fecha,db.clientes.giro,db.tarifa.nombre,
> db.estados.nombre,db.clientes.tarifica,
> join=(db.tarifa.on(db.clientes.id_tarifa==db.tarifa.id),
> db.estados.on(db.clientes.estado==db.estados.id),
> db.tipos.on(db.clientes.tipo==db.tipos.id),
> db.tarificacion.on(db.clientes.tarifica==
> db.tarificacion.id)),
>
> orderby=db.clientes.rsocial)
>
> powerTable = plugins.powerTable
> powerTable.datasource = reg
> .............
> .............
> table=powerTable.create()
> return dict(table=table)
>
>
> I do not understand what is wrong.
>
> --- On *Sun, 9/30/12, Massimo Di Pierro <[email protected]<javascript:>
> >* wrote:
>
>
> From: Massimo Di Pierro <[email protected] <javascript:>>
> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no
> attribute 'virtual'
> To: [email protected] <javascript:>
> Date: Sunday, September 30, 2012, 11:00 PM
>
> I think it should be Virtual, not virtual.
>
> On Sunday, 30 September 2012 20:11:34 UTC-5, visuallinux wrote:
>
> Dear All.
>
> I am trying to use PowerTable, but i am receiving the follow error:
>
> Traceback (most recent call last):
> File "/home/fvillarroel/www/web2py/ gluon/restricted.py", line 209, in
> restricted
> exec ccode in environment
> File "/home/fvillarroel/www/web2py/ applications/administrador/
> controllers/clientes.py", line 107, in <module>
> File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in
> <lambda>
> self._caller = lambda f: f()
> File "/home/fvillarroel/www/web2py/ gluon/tools.py", line 2783, in f
> return action(*a, **b)
> File "/home/fvillarroel/www/web2py/ applications/administrador/
> controllers/clientes.py", line 63, in clientes
> table=powerTable.create()
> File "/home/fvillarroel/www/web2py/ applications/administrador/
> models/plugin_powertable.py", line 704, in plugin_powertable
> PowerTable(),
> File "/home/fvillarroel/www/web2py/ applications/administrador/
> models/plugin_powertable.py", line 178, in __init__
> headers[c] = sqlrows.db[t][f].label
> File "/home/fvillarroel/www/web2py/ gluon/dal.py", line 7136, in
> __getitem__
> return self.__getattr__(str(key))
> File "/home/fvillarroel/www/web2py/ gluon/dal.py", line 7143, in
> __getattr__
> return ogetattr(self, key)
> AttributeError: 'DAL' object has no attribute 'virtual'
>
>
> Any idea.
>
>
> --
>
>
>
>
>
--