>
> invoice_grid = SQLFORM.smartgrid(db.invoice, args=request.args[:1], 
>> constraints=dict(invoice=invoice_query), 
>> linked_tables=dict(invoice=['item'], item=[]))
>>
>> Noted that i could select a set of invoices based on the customer_id I 
>> passed in through request.args(0), the only thing it broke was when I 
>> clicked on the linked_tables "Items" with error  Query Not Supported: 
>> invalid literal for long() with base 10: 'item'. 
>>
>> I have been stuck here for a few days, any further help is much 
>> appreciated. 
>>
>
>  From the error message, I suspect the part 
> linked_tables=dict(invoice=['item'],...)  needs to specify an ID, and 
> you've provided a string (and a string not corresponding to a valid base10 
> number).
>
No, that's not the problem. The linked_tables argument should indeed be a 
dictionary with lists of table names.

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to