Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3699 Visualizzazioni

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 ?



Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
feb 17
2893
1
gen 16
6248
4
gen 16
6277
4
lug 20
8371
0
dic 19
3742