I don't know about the "order.order_item.select()" part. Have you tried debugging the "calc" method? Insert this line right above "result = 0": import pdb; pdb.set_trace()
Run the app from the console (i.e: python web2py.py -a password ...) and when the method gets called, the application should freeze. If you look at the console, you will have a (Pdb) prompt. Continue to enter "n" to move to the next line and type "print result" to show the value of result at any time. You should be able to figure out the problem this way. If the application continues to work without freezing, then the "calc" method is not even being called, so you'd need to figure out why.

