Other users have the same problem and, sorry but I can't find my solution;
i tried with readable=true and writable=true, to update all the field
interested in the compute function, to comment the line in DAL.py, but
nothing.
I have this table:
db.define_table('magazzino',
Field('id_tipo', 'integer',default=0),
Field('p_p','double', default=0.0),
Field('pp_tot','double', writable=True, readable=True, compute=lambda
r: r['id_tipo']==0 and r['p_p']*1 or r['p_p']*r['id_tipo']*-1),
)
If I edit a row with a FORM the compute field works but if I edit it in a
function with ajax don't...
def modArtPrice():
newPp = 100
articolo = db.magazzino[request.vars.id]
articolo.id_tipo=articolo.id_tipo
articolo.p_p=newPp
articolo.update_record()
what's wrong?
s.
--