Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3438 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
out. 21
3514
1
fev. 16
5387
2
mar. 15
4291
1
mar. 15
10244
0
jul. 25
200