Last active
April 20, 2016 19:13
-
-
Save leorochael/888f1a728b227676244c to your computer and use it in GitHub Desktop.
Using IPython with anybox.recipe.odoo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [buildout] | |
| parts = odoo | |
| find-links = http://download.gna.org/pychart/ | |
| [odoo] | |
| version = git http://github.com/odoo/odoo.git odoo 8.0 depth=1 | |
| recipe = anybox.recipe.odoo:server | |
| eggs = | |
| nose | |
| ipython | |
| bpython | |
| openerp_scripts = | |
| nosetests=nosetests command-line-options=-d | |
| ipython command-line-options=-d arguments=user_ns=dict(session=session) | |
| bpython command-line-options=-d arguments=locals_=dict(session=session) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Sessionobject that is used inopenerp_scriptsexpects that its switches be separated from the switches for the underlying script (i.e.nosetestsoripython) by--.This means that, in order to actually pass the
-dswitch for selecting the database, you need invoke, say,ipython_odoogenerated by the buildout above like:Otherwise the Session will try to open the database specified by
db_namein<buildout:dir>/etc/odoo.cfg(i.e. generated by theoptions.db_nameparameter toanybox.recipe.odoo:server), defaulting to the database named after the current user.And IPython itself will complain that it doesn't know a
-dswitch.