OpenERP

  • Tags: integration, openerp, erp, crm
  • Latest: 0.1
  • Last Updated: 02 March 2011
  • Grails version: 1.3.6 > *
  • Authors: Kristofer Eriksson
0 vote
Dependency:
compile ":openerp:0.1"

 Documentation

Summary

Installation

grails install-plugin openerp

Description

OpenERP is a flexible, modular and innovative open-source ERP platform, which allows businesses to customize their interface and choose from a suite of business applications including Project Management, Human Resources, Financial Management, CRM and more. OpenERP is a based on a client/server architecture. The server and the client(s) communicate using the XML-RPC protocol. More information on OpenERP itself is available at openerp.com.

The Grails OpenERP plugin simplifies integration with the platform over the XML-RPC interface, which allows external access to the complete set of data and functionality.

Configuration

The plugin must be configured with options which all may be expressed in @grails-app/conf/Config.groovy@. A basic configuration looks like this:

// grails-app/conf/Config.groovy
openerp {
    baseurl = 'http://localhost:8069/xmlrpc'
    db = 'testdb'
    usr = 'testuser'
    pwd = 'testpwd'
}

Those are settings which are necessary in order for the plugin to be able to connect to and communicate with an OpenERP instance.

Using the plugin

It is very easy to use the plugin. We only have to add the @ClientSession annotation to every method where we need to access the configured OpenERP instance/db. Within the method, we use the ClientSessionHolder to perform our read or write operations accordingly, like:

class ClientSessionTestService {
    @ClientSession
    def readPartner(partner_id) {
        return ClientSessionHolder.exec('res.partner', 'read', [partner_id], [])
    }
}

The plugin will automatically log in to the OpenERP instance, using the configured username and password, and afterwards end the session created.

Release History

  • March 1, 2011
    • initial 0.1 release