İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3571 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eki 21
3646
1
Şub 16
5529
2
Mar 15
4406
1
Mar 15
10342
0
Tem 25
308