Skip to Content
Menu
This question has been flagged
1 Atsakyti
3495 Rodiniai

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?


Portretas
Atmesti
Best Answer

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

models.execute_kw(dbname, uid, password,    'my.model', 'do_stuff' ,[])
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
spal. 21
3583
1
vas. 16
5460
2
kov. 15
4343
1
kov. 15
10288
0
liep. 25
244