This repository contains a zc.buildout
bundle to install and configure OpenERP and some related tools on Debian or Ubuntu.
This is tested on Debian Squeeze.
Features:
- install and configure OpenERP 6.1 or 7.0 (using
anybox.recipe.openerp
) - install and configure
supervisor
- install and configure
ERPpeek
- download and install
wkhtmltopdf
binary for thereport_webkit
addon - install testing tools
unittest2
,mock
andbehave
(for Behavior-driven development) - enhance Behave and provide
nose.tools
helpers (seefeatures/README.rst
) - provide sample BDD Features with generic Gherkin sentences and Mocks
And all these tools are ready to use.
Clone the repository:
$ git clone git://github.com/florentx/openobject-mirliton.git oo-mirliton $ cd oo-mirliton $ git checkout anybox70
Hint:
switch to
anybox61
branch if you need the previous version. The third branchbuildout
is also configured for OpenERP 6.1, but it does not use theanybox.recipe.openerp
recipe.Follow the instructions in the
README.rst
at the root of the repository
Run the BDD tests (it deletes and re-create the behave database):
$ bin/behave
Start OpenERP in interactive mode:
$ bin/supervisorctl shutdown $ bin/start_openerp
Start and monitor the daemon:
$ bin/supervisord $ bin/supervisorctl status $ bin/supervisorctl help
Connect to a running instance of OpenERP:
$ bin/erppeek --list $ bin/erppeek --env behave
The default configuration only creates the behave
database for the tests.
When you start to explore, you might want to create your own database.
Connect to OpenERP and create the database:
$ bin/supervisorctl shutdown $ bin/erppeek --env +openerp >>> client.create_database('admin', 'demo_db', demo=True) ^D
Update the configuration in buildout.cfg
:
- change
options.db_name
todemo_db
- change
options.admin_passwd
with a secret password (optional)
Re-run bin/buildout
Now you can connect to the new database with:
$ bin/erppeek --env openerp
Or (if the server is off):
$ bin/erppeek --env +openerp
Read
features/README.rst
to start Behavior-driven development (BDD).To upgrade all the dependencies to newer versions, comment the line
etc/buildout-pinned.cfg
with a semi-colon inbuildout.cfg
, then re-runbin/buildout
(not recommended for Production).Edit the
etc/erppeek.ini.in
file to connect to remote instances of OpenERP, then re-runbin/buildout
to regenerateerppeek.ini
.Connect to local OpenERP without running the server (add a
+
before the name):$ bin/erppeek --env +behave
Note: the Behave integration is re-used in the OpenERP Scenario project. Don't miss it.
References: