I have the two tables defined in my model as below. Its simple one-to-many model (company and related people). Company has defined format in table definition but when listing person items in database admin, there are just ids insetad of company name.(see screenshot attached) I have the same thing in another app and its working as expected. Whats wrong here, cant figure out :-( ?
## COMPANY db.define_table('company', Field('company_name','string', label='Company', requires=IS_NOT_EMPTY()), Field('mat_org','reference company', label='Parent company'), Field('company_name','string', label='Company', requires=IS_NOT_EMPTY()), Field("ico", "string", label=T('ICO')), Field("dic", "string", label=T('DIC')), Field("address", "string", label=T('Address')), Field("city", "string", label=T('City')), Field("zip", "string", label=T('ZIP')), Field("www", "string", label=T('WWW')), Field("email", "string", label=T('Email')), Field("manager",db.auth_user, default=auth.user_id, label=T('Manager'), requires=IS_IN_DB(db,"auth_user.id",'%(last_name)s %(first_name)s')), format='%(company_name)s', migrate=MIGRATE ) ## PERSON db.define_table('person', Field('company',db.company, label='Company', notnull=True, requires=IS_IN_DB(db,"company.id",'%(company_name)s') ), Field('first_name','string', label='FirstName'), Field('last_name','string', label='LastName', requires=IS_NOT_EMPTY()), Field('email','string', label='Email'), Field('phone','string', label='Phone'), Field('mobile','string', label='Mobile'), format='%(last_name)s', migrate=MIGRATE )
<<attachment: s01.jpg>>