reference representatnion

30 views
Skip to first unread message

baiyo...@gmail.com

unread,
Oct 11, 2017, 12:49:18 PM10/11/17
to web2py-users

db.define_table('store',
                Field('name', 'string'),
                auth.signature,
                format='%(name)s',
                )

db.define_table('stock',
                Field('stock_serial', 'string'),
                Field('stock_location', 'reference store'),
                auth.signature,
                format='%(stock_serial)s of %(stock_location)s',
                )

db.define_table('item',
                Field('item_stock', 'reference stock'),
                Field('name', 'string'),
                Field('cost_price', 'decimal(7,2)'),
                auth.signature,
                format='%(name)s',
                )

i have these three tables, when i create new item, in the drop down store id appears, I need the name to appear
instead of id. help me on what i should do. i am new with web2p.

Anthony

unread,
Oct 11, 2017, 2:46:16 PM10/11/17
to web2py-users
Reply all
Reply to author
Forward
0 new messages