> > 1. when i select itemcode from dropdown, the form to fill itemname and > sellingprice from the stockitems table >
i think you can achieve it using form.validate(), use query for stockitems table and then insert itemname and sellingprice base on the row of stockitems > 2. when i enter qty, the amount to be calculated as qty*sellingprice > this one you can do it, either with compute on dal side or you can calculate it during form.validate on above method. e.g. for compute db.sales.compute = lambda r: r['sellingprice']*r['qty'] ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Computed-fields another way, i think you can learn much from the web2py appliances PosOnlineStore ref: https://github.com/mdipierro/web2py-appliances/tree/master/PosOnlineStore https://github.com/mdipierro/web2py-appliances/tree/master/EStore 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.