Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3735 มุมมอง

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 ?



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 17
2920
1
ม.ค. 16
6271
4
ม.ค. 16
6301
4
ก.ค. 20
8403
0
ธ.ค. 19
3760