You only get automatic dropdowns if the referenced table has a "format".
What is the difference between the first "not work" and the last "work".
The code you show is the same.
Attention. Do not call a table "transaction". It is a reserved SQL keyword.
On Tuesday, 29 January 2013 23:55:25 UTC-6, 黄祥 wrote:
>
> hi,
>
> reference table doesnot work when using auth.signature and format, is
> there any solutions for this?
> reference table only work without auth.signature and format.
>
> for example :
> *not work:*
> db.define_table('product',
> Field('name', label=T('Name')),
> Field('unit_price', 'double', label=T('Unit Price')),
> auth.signature,
> format='%(name)s')
>
> db.define_table('transaction',
> Field('transaction_no', label=T('Transaction No.')),
> Field('product_id', 'reference product', label=T('Product ID')),
> auth.signature)
>
> *not work:*
> db.define_table('product',
> Field('name', label=T('Name')),
> Field('unit_price', 'double', label=T('Unit Price')),
> auth.signature)
>
> db.define_table('transaction',
> Field('transaction_no', label=T('Transaction No.')),
> Field('product_id', 'reference product', label=T('Product ID')),
> auth.signature)
>
>
> *not work:*
> db.define_table('product',
> Field('name', label=T('Name')),
> Field('unit_price', 'double', label=T('Unit Price')))
>
> db.define_table('transaction',
> Field('transaction_no', label=T('Transaction No.')),
> Field('product_id', 'reference product', label=T('Product ID')),
> auth.signature)
> *
> work:*
> db.define_table('product',
> Field('name', label=T('Name')),
> Field('unit_price', 'double', label=T('Unit Price')),
> format='%(name)s')
>
> db.define_table('transaction',
> Field('transaction_no', label=T('Transaction No.')),
> Field('product_id', 'reference product', label=T('Product ID')),
> auth.signature)
>
> thanks so much in advance.
>
--
---
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.