I think this would work better however I am not sure about the items.. is 
the item_entry table how its normally done? Examples online vary... 
A completed Service order would have multiple Item_entry references... Just 
doesn't seem like the right way to do it.. 


db.define_table('company',
>
>     Field('name', 'string'))
>
>
>> db.define_table('lease',
>
>     Field('name', 'string'),
>
>     Field('attn', 'string'),
>
>     Field('location', 'string'))
>
>
>> db.define_table('account_code',
>
>     Field('code','string'))
>
>
>> db.define_table('item',
>
>     Field('name', 'string'),
>
>     Field('pl_no', 'integer'),
>
>     Field('cost', 'double'))
>
>
>> db.define_table('item_entry',
>
>     Field('item', 'reference item'),
>
>     Field('amount', 'double'))
>
>
>> db.define_table('service_order',
>
>     Field('so_date', 'date'),
>
>     Field('so_num', 'integer'),
>
>     Field('so_hours', 'double'),
>
>     Field('total_cost', 'double'),
>
>     Field('notes', 'text'),
>
>     Field('company', 'reference company'),
>
>     Field('lease', 'reference lease'),
>
>     Field('acct_code', 'reference account_code'),
>
>     Field('items', 'list:reference item_entry')
>
>     )
>
>

-- 
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