Related type field not showing value

亡梦爱人 提交于 2019-12-04 19:23:49

In OpenERP, When you use related field, it's give value or output based on it's type. For example type='char', See other fields type.

In your case you need to use type='many2one' for getting desire output.

try this,

class activity_summary(osv.osv):
    _name = "budget.activity_summary"
    _rec_name = "activity_summarycode"
    _columns = {
        'activity_summarycode' : fields.many2one("budget.activity_year", "Activity Summary Code", ondelete= "no action", required=True ),
        'region_id' : fields.related("activity_summarycode", "mgmt_code", type="many2one", string = "Management Code", relation="budget.activity_year", size=64, store = True),
} 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!