跳至内容
菜单
此问题已终结
3619 查看

Hi everyone,

Using an automated server action I'd like to link an object with another one using a reference field.

So the automated action is : When object 1 is created I create a new record in another model.

I try to assign the reference field with the following python expression : 

    object.env['model1'].search([('id','=',object.id)],limit=1).id


Therefore when the action run I got the following error :

   raise ValueError("Wrong value for %s: %r" % (self, value))

 ValueError: Wrong value for qc.inspection.object_id: xxxx


Anybody has an idea where I am wrong ?



形象
丢弃
相关帖文 回复 查看 活动
0
2月 17
2815
1
1月 16
6164
4
1月 16
6164
4
7月 20
8279
0
12月 19
3669