I would like to know how to display all products available (from openERP 7) to a website. Potential customers should be able to browse, select and get a quotation. Thanks a lot for any idea.
1 Answers
0
votes
You need to use the XMLRPC ro pull the data from openerp sever using some script here the simple python XML-RPC example but you can use diff lib in different lang to call the XML-RPC:
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)
More about XML-RPC and Web-Service is here. Odoo CEO had explained more here