Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3506 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
3590
1
feb 16
5469
2
mar 15
4354
1
mar 15
10294
0
lug 25
250