Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3995 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
okt. 21
4106
1
feb. 16
6062
2
mrt. 15
4868
1
mrt. 15
10948
0
jul. 25
679