跳至內容
選單
此問題已被標幟
1 回覆
3524 瀏覽次數

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?


頭像
捨棄
最佳答案

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

models.execute_kw(dbname, uid, password,    'my.model', 'do_stuff' ,[])
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
10月 21
3613
1
2月 16
5487
2
3月 15
4365
1
3月 15
10315
0
7月 25
256