>
> db.define_table('supplier',
> Field('suppliercode',requires=IS_UPPER()),
> format='%(suppliercode)s')
>
> db.define_table('series',
> Field('seriesname'),
> Field('seriesdescription',requires=IS_UPPER())...
>
> db.define_table('product',
> Field('series', 'reference series'),
> Field('suppliercode','reference supplier', default=db.supplier.id)...
>
>
> Shouldnt the fields series and suppliercode automatically populate in the
> grid? Right now only series populates itself.
>
What do you mean by "automatically populate in the grid"? The grid shows
records that have already been inserted. Did the records in question have
the expected values when inserted?
Note, you do not define a default for the "series" field. Also, the default
for the "suppliercode" field must either be a value or a function that
generates a value -- it should not be a field object.
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.