You can't access valor_do_dolar from custo_em_real lambda computed since it
is a computed field that get computed un submit... If you want to do that
you will have to make a real function that get process on submit with
form.process().accepted and the argument onsuccess or onvalidation
See
Nice Catch, but I have commented the last field to apply what you suggested
and this also doesn't work:
db.define_table('compra_produto',
Field('compra', 'reference compra'),
Field('produto','reference produto'),
Field('quantidade','integer'),
Field('custo_em_dolar','double'),
You valor_do_dolar field is still a problem in the model down here... Since
you can't or your lambda can't accès valor_do_dolar in that example. The
field don't exist in the form so the key not exist so web2py return none
and custo_em_dolar*none will return none I guest.
try this :
Thanks a lot Richard! you were right! I have put the wrong field on the
calculation! You are the best!
Thank you!
On Wed, Feb 29, 2012 at 6:25 PM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
You valor_do_dolar field is still a problem in the model down here...
Since you can't or your
4 matches
Mail list logo