0
我想知道如何顯示可用的(從OpenERP的7)所有產品的網站。潛在客戶應該能夠瀏覽,選擇並獲取報價。非常感謝任何想法。連接的OpenERP 7與網站
我想知道如何顯示可用的(從OpenERP的7)所有產品的網站。潛在客戶應該能夠瀏覽,選擇並獲取報價。非常感謝任何想法。連接的OpenERP 7與網站
你需要使用XMLRPC RO使用一些腳本這裏簡單pytohn XMLRPC例如,從OpenERP的服務器提取數據,但你可以在不同的郎使用diff LIB調用XMLRPC:
import xmlrpclib
username = 'admin' #the user
pwd = 'admin' #the password of the user
dbname = 'openerp' #the database
# Get the uid
sock_common = xmlrpclib.ServerProxy ('http://localhost:8069/xmlrpc/common')
uid = sock_common.login(dbname, username, pwd)
#replace localhost with the address of the server
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
#THis will search all product from database.
product_ids = sock.execute(dbname, uid, pwd, 'product.product', 'search', [])
#This will read all product from that db with all fields.
product_vals = sock.execute(dbname, uid, pwd, 'product.product', 'read', product_ids)