Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5169 Zobrazení

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
Zrušit

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/

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 15
4285
0
bře 15
4004
2
bře 15
9082
4
dub 24
2469
1
kvě 22
4988