Toll Free: (855) 881-7165

LiveZilla Live Chat Software             

OpenERP 7.0 Videos - Install, Configure, and Implement OpenERP


OpenERP 7 is a great open source ERP platform that is easy to install and very modular. Working with clients in OpenERP and helping them make difficult decisions we have found one of the most helpful steps is getting their company data into OpenERP. So many ERP vendors are trying so hard to sell the product they are not even willing to go through the effort of demonstrating their system with at least some company data in place for them to work with. The purpose of this article and video is to demonstrate just how easy it is to write a custom script to import data into OpenERP. 

Source code used in the video is provided below.

Example Python Script for importing data into OpenERP 7 using XML-RPC method

import xmlrpclib
import csv

username = "admin"
pwd = "demo"
dbname = "db2"

sock_common = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/common")

uid = sock_common.login(dbname, username, pwd)

sock = xmlrpclib.ServerProxy("http://localhost:8069/xmlrpc/object")

reader = csv.reader(open('products.csv','rb'))
for row in reader:
    print row[1]
    product_template = {
        'name': row[1],
    template_id=sock.execute(dbname, uid,pwd, 'product.template','create',product_template)

    product_product = {
        'active': True,
    product_id = sock.execute(dbname,uid,pwd,'product.product','create',product_product)

Post Rating


There are currently no comments, be the first to post one.

Post Comment

Name (required)

Email (required)


Enter the code shown above: