I need call the method "button_block" of model "mrp.workcenter.productivity" using XMLRPC because I want block a workorder using my raspberry pi. I need help because i don't know how I can pass the parameter "loss_id" to block the workorder. On the other hand when I call the method "button_block" there is a erro because the methon hasn´t return value.
My code is this(using python 3.7.4 ):
from xmlrpc import client as xmlrpclib
url= 'http://localhost:8069'
db='TFG_Sergio_pruebas'
username='user'
password='pass'
common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
uid = common.login(db, username, password)
bloquear_ct= models.execute_kw(db,uid,password,
'mrp.workcenter.productivity','button_block',[6],{})
print(bloquear_ct)
I know how make the call ando don´t have the problem of none return, but I don´t know how make tu pass the "loss_id" parameter to the method "button_block".
Can you please post the code you tried and the error you are getting?