这里是我的功能领域串联2场
'a' : fields.integer('A'),
'b' : fields.integer('B'),
'concat' : fields.function(get_concat, method=True, string='Inventaires',type='char', size=40),
我的树状视图显示一点儿也不任何记录的
def get_concat(self, cr, uid, ids, field_name, arg, context):
x = {}
for record in self.browse(cr, uid, ids ,context):
x[record.id] = record.a+"--"+ record.b
return x
定义。当我评论功能领域时,一切都很好。这就是我知道我的功能是不正确的 你能告诉我什么是我在这个功能中的错误! 谢谢
您需要尝试缩小问题范围,是否可以打印出record.a,record.b,record.id并向我们显示您获得的内容? – xvatar
我猜你正在做OpenERP。你能为你的代码提供更多的上下文吗? – ChipJust
你可以粘贴你已经定义的字段吗? – OmaL