Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3456 Widoki

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?


Awatar
Odrzuć
Najlepsza odpowiedź

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

models.execute_kw(dbname, uid, password,    'my.model', 'do_stuff' ,[])
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 21
3531
1
lut 16
5406
2
mar 15
4303
1
mar 15
10257
0
lip 25
206