Skip to Content
Menu
This question has been flagged

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. I don´t know how pass the "loss_id" parameter to the method "button_block".

I'm using python 3.7.4, my code is this:

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 think that I need write something here*

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 19
4414
4
Jan 19
12884
4
Dec 19
6787
1
Jul 18
6064
2
Dec 19
21621