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

I have a method in a model with this signature:

@api.model
def do_stuff(self, arg1):
...


The method expects a singleton therefore I must pass an ID when calling it. How can I pass the object ID when in the web service calls?


Avatar
Abbandona
Risposta migliore

while calling these method decorated with @api.model just pass the blank list like 

models.execute_kw(dbname, uid, password,    'my.model', 'do_stuff' ,[])
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ott 21
3766
1
feb 16
5615
2
mar 15
4475
1
mar 15
10460
0
lug 25
366