Plugins You can find out about all the publicly available Grails plugins.


  • Authors: Kristofer Eriksson
0 vote
compile "org.grails.plugins:openerp:0.1"




grails install-plugin openerp


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

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.


The plugin must be configured with options which all may be expressed in @grails-app/conf/[email protected] 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 {
    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