yes

db.define_table('customer',
    Field('user_id', db.auth_user,
           writable=False, readable=False),
    address('bill'),    #inherit address fields
    address('ship'),    #inherit address fields
    phone,              #inherit phone fields
    migrate = 'customer.table'
    )

you can also set on a per-action bases

db.customer.user_id.readable=True or False

On Jan 9, 11:04 am, kbochert <kboch...@copper.net> wrote:
> Problem:
>
> I have database tables for customers, members, etc that look like
> db.define_table('customer',
>     Field('user_id', db.auth_user),
>     address('bill'),    #inherit address fields
>     address('ship'),    #inherit address fields
>     phone,              #inherit phone fields
>     migrate = 'customer.table'
>     )
>
> I have database records for  'clients', 'customers', 'members' etc.
> each of which has
> a field 'user_id' which references the auth_user table and a dozen or
> so other fields.
>
> When SQLFORM displays this it shows a pull-down list of all auth_user
> id's which should not be editable or even seen by users editing their
> record.
>
> How do I accomplish this? The 'fields' parameter of the SQLFORM call
> will work, but adding those dozen field names is awkward and error-
> prone as field names get changed. Also naming the fields to be
> displayed is misleading where the intent is actually to hide fields.
> Using groups and permissions seems needlessly complex.
>
> Feature:
> Add an additional optional parameter to the call to SQLFORM named
> 'not_fields' which would specify which fields are not displayed.
>
> Or maybe there's a way to do this easily already?
>
> karl
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to