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

Hi.

I have a stand alone python code that interacts with a few variables, im wondering if there is a way to conect to OpenERP and extract those variables from sale.order.

Is it possible?, how can i do it?

Avatar
Cancelar

Yes, it is possible. You can refer web services in OpenERP to do it. Link: https://doc.openerp.com/6.0/developer/6_22_XML-RPC_web_services/

Melhor resposta

You can use openerp client lib (search for it on Github), and try this to start with:

import openerplib
connection = openerplib.get_connection(hostname="localhost", database=dbname, 
                                       login=username, password=pwd)

 sale_model = connection.get_model("sale.order")
 ids = sale_model.search([])
 for id in ids:
     so = sale_model.read(id, ["name"])
     print so
Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mar. 15
4272
0
mar. 15
4001
2
mar. 15
9071
4
abr. 24
2447
1
mai. 22
4982