Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3431 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
oct 21
3502
1
feb 16
5375
2
mar 15
4282
1
mar 15
10238
0
jul 25
170