anybox.recipe.openerp
=====================

.. contents::

This is a buildout recipe to download, install and configure OpenERP server,
web client and gtk client. It currently only supports version 6.0.

 - For the server: recipe = anybox.recipe.openerp:server
 - For the web client: recipe = anybox.recipe.openerp:webclient
 - For the gtk client: recipe = anybox.recipe.openerp:gtkclient

Recipe options
~~~~~~~~~~~~~~

zc.recipe.egg options
---------------------

This recipe reuses the *zc.recipe.egg* recipe, so the options are the same
(*eggs*, *interpreter*, etc.)
Consult the documentation here http://pypi.python.org/pypi/zc.recipe.egg/1.3.2

specific options
----------------

It also adds a few specific options :

 * **version**: specify the version of OpenERP (server, web client or gtk client)
 * **url** : specify the direct download url for the server or client archive.
   This option overrides the version specification
 * **script_name**: specify the name of the startup script to generate

OpenERP options
---------------
The OpenERP configuration files are generated by OpenERP itself in the buildout
etc/ directory during the first buildout run.  You can overwrite options in
these config files in the recipe section of your buildout.cfg.  The options
must be written using a dotted notation prefixed with the section name. The
specified options will just overwrite the existing options in the corresponding
config files. You don't have to replicate all the options in your buildout.cfg.
If an option or a section does not exist it can be created.

For example you can specify the xmlrpc port for the server, the addons path or
even an additional option that does not exist in the default config file::

  options.xmlrpc_port = 8069
  options.addons_path = ${buildout:directory}/addons,${buildout:directory}/extra-6.0
  options.additional_option = "foobar"

It will end-up in the server option as::

  [options]
  xmlrpc_port = 8069
  addons_path = /path/to/your/project/addons,/path/to/your/project/extra-6.0
  additional_option = "foobar"

For the web client you can specify the company url with::

  global.server.socket_port = 8080
  openerp-web.company.url = 'http://anybox.fr'

It will modify the corresponding web client config::

  [global]
  server.socket_port = 8080
  [openerp-web]
  company.url = 'http://anybox.fr'


Generated scripts
~~~~~~~~~~~~~~~~~

Startup scripts are created in the bin/ directory. By default the name is:
start_<part_name>, so you can have several startup scripts for each part if you
configure several OpenERP servers or clients. You can pass additional typical
arguments to the server via the startup script, such as -i or -u options.


Example buildout
~~~~~~~~~~~~~~~~

Here is a sample buildout with versions specification, 2 OpenERP servers
using only NETRPC and listening on 2 different ports, and 2 web clients ::

    [buildout]
    parts = openerp1 web1 openerp2 web2
    allow-picked-versions = false
    versions = versions
    find-links = http://download.gna.org/pychart/
    
    [openerp1]
    recipe = anybox.recipe.openerp:server
    eggs = PIL
    version = 6.0.3
    options.xmlrpc = False
    options.xmlrpcs = False
    
    [web1]
    recipe = anybox.recipe.openerp:webclient
    version = 6.0.3
    
    [openerp2]
    recipe = anybox.recipe.openerp:server
    eggs = PIL
    version = 6.0.3
    options.xmlrpc = False
    options.xmlrpcs = False
    options.netrpc_port = 8170
    
    [web2]
    recipe = anybox.recipe.openerp:webclient
    version = 6.0.3
    global.openerp.server.port = '8170'
    global.server.socket_port = 8180
    
    [versions]
    MarkupSafe = 0.15
    PIL = 1.1.7
    anybox.recipe.openerp = 0.5
    caldav = 0.1.10
    collective.recipe.cmd = 0.5
    coverage = 3.5
    distribute = 0.6.21
    feedparser = 5.0.1
    lxml = 2.1.5
    mako = 0.4.2
    Mako = 0.4.2
    nose = 1.1.2
    psycopg2 = 2.4.2
    pychart = 1.39
    pydot = 1.0.25
    pyparsing = 1.5.6
    python-dateutil = 1.5
    pytz = 2011h
    pywebdav = 0.9.4.1
    pyyaml = 3.10
    reportlab = 2.5
    vobject = 0.8.1c
    z3c.recipe.scripts = 1.0.1
    zc.buildout = 1.5.2
    zc.recipe.egg = 1.3.2
    Babel = 0.9.6
    FormEncode = 1.2.4
    simplejson = 2.1.6


Contribute
~~~~~~~~~~
The primary branch is on the launchpad:

- Code repository: https://code.launchpad.net/~anybox/+junk/anybox.recipe.openerp

Please branch on the launchpad or contact the author to report any bug or ask
for a new feature.


