hi, is the compute can work together with after_insert on table? i've tried before but return an error, and must do separately. e.g. *error* def __after_insert(f, id): db(db.dvd.id == f.dvd).update(quantity = db.dvd(f.dvd).quantity - f.quantity)
def on_define_rent_detail(table): table._after_insert.append(__after_insert) table.total_price.compute = lambda r: r['quantity'] * r['price'] if i want to make it work i must do separetely, e.g. put the after insert function on controller, or put the compute function during insert table on controller. is it possible to make compute and after_insert callback work together on table? best regards, stifan -- 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/groups/opt_out.

