Přejít na obsah
Menu
You need to be registered to interact with the community.
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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 19
5337
4
led 19
14476
4
pro 19
7881
1
čvc 18
7314
2
pro 19
22911