[quote author=Joshua link=topic=6723.msg16024#msg16024 date=1369966281][quote author=RSong link=topic=6723.msg16023#msg16023 date=1369965411][quote author=Joshua link=topic=6723.msg16020#msg16020 date=1369964804]使用 related field。修改模型B的name_get()[/quote]7.0字段类型有related ??一定要修改到源代码吗?在前端能够做到吗?[/quote]有的。product/pricelist.py
<br />'company_id': fields.related('pricelist_id','company_id',type='many2one',<br />readonly=True, relation='res.company', string='Company', store=True)
前端能否做到,应该是可以的,不过具体没了解过。[/quote]嗯,谢谢你提供的答案。7.0前端里面没得直接选择related的字段类型,或许要以别的方式实现