Hi all, I have been hitting the wall for probably a simple problem. I have 2 tables sales order and customer, db.sales_order.customer reference customer table.
db.define_table('customer', auth.signature, Field('name', 'string', requires=IS_NOT_EMPTY(), label=T("Company name")), Field('address1', 'string', requires=IS_NOT_EMPTY()), Field('city', 'string'), Field('post_code', 'string', label=T("Post code")), Field('country_id', 'reference country_list', requires=IS_EMPTY_OR(IS_IN_DB(db, 'country_list.id', '%(name)s %(code)s')), label=T("Country")), db.define_table('sales_order', auth.signature, Field('ordernumber', 'string', label=T('Your order #'), unique=True, length=250), Field('customer', 'reference customer', label=T('Customer')), format='%(ordernumber)s' ) On the SQLFORM editing the sales order, I would like to show more info, like customer name + address1 + city, rather than just the name. I tried This is the SQLFORM db.sales_order.customer.represent = 'change representation' form = SQLFORM(db.sales_order, so_id, _name='form1') As you can see, I changed the represent of customer filed to a static string. But even this won't work. the editing form is still show the name of the customer. Can someone hint me where I did it wrongly? Thanks! Cheers, Vic -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.