跳至內容
選單
此問題已被標幟
1 回覆
5222 瀏覽次數

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?

頭像
捨棄

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/

最佳答案

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
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
4352
0
3月 15
4034
2
3月 15
9120
4
4月 24
2510
1
5月 22
5014