> def create_stock_task():
>     form = SQLFORM <http://127.0.0.1:8000/examples/global/vars/SQLFORM> 
> (db.stock_task).process()
>     if form.accepted:
>         task = db(db.stock_task.id>0).select(limitby=(0,1), 
> orderby=~db.stock_task.id).first()
>         pdays_row = db(db.stock_task.product==db.product._format)
>         pdays = pdays_row.withholding_period.select()
>
>
pdays is a DAL Set object, but you are treating it like a Table object 
(i.e., expecting it to have an attribute called "withholding_period", which 
is a field in the db.product table). Furthermore, you then apply the 
.select() method to what appears to be a Field object, which doesn't make 
sense.

It appears you are expecting pdays to end up being a single integer value, 
but not clear exactly how that should be calculated. Perhaps you can 
explain what you are trying to do.

Anthony

-- 
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/d/optout.

Reply via email to