İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3548 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
3630
1
Şub 16
5497
2
Mar 15
4369
1
Mar 15
10328
0
Tem 25
278