Package: acsone.recipe.odoo.pydev
An extension toanybox.recipe.odoothat generatesOdooprojects for theEclipse PyDevIDE.ContentsWhat it isHow to use itSupported optionsBehind the curtainContributorsChange history2.0 (2014-12-08)1.2 (2014-10-13)1.1 (2014-09-08)1.0 (2014-05-30)DownloadCode repository:http://github.com/acsone/acsone.recipe.odoo.pydevReport bugs athttp://github.com/acsone/acsone.recipe.odoo.pydev/issuesWhat it isThis buildout  recipe is
an extension to the fully featured recipe developed by Anybox:anybox.recipe.odoo.It generates a ready-to-use Eclipse PyDev Project,
pointing to all dependencies required to develop, run
and debug yourOdooserver
as well as your own addons.The generated project is fully configured, including a preset
PYTHONPATH so as to support debugging, pep8 import checks, auto completionHow to use itSince the recipe is an extension toanybox.recipe.odoo, the first step, if not done,
is to add youranybox.recipe.odoo, configuration tobuildout.cfgand include it in${buildout:parts}.An example:[buildout]
...
parts = ... openerp

[openerp]
recipe = anybox.recipe.odoo:server
version = git https://github.com/odoo/odoo.git odoo 7.0
addons = ...
....Another example using git and Odoo V8:[buildout]
...
parts = ... openerp

[openerp]
recipe = anybox.recipe.odoo[bzr]:server
version = git https://github.com/odoo/odoo.git odoo 8.0
addons = ...
....A good practice is to use the inheritance mechanism of buildout to define your
development environment in an other file such asdevel.cfg:[buildout]
extends = buildout.cfg
parts = ... pydevproject

[pydevproject]
<= openerp
recipe = acsone.recipe.odoo.pydev
project-name = my_project_name
python-version = python 2.7
python-interpreter = Default
eggs += any_additional_egg_you_wantThen prepare your virtualenv and install zc.buildout$ virtualenv$ bin/pip install zc.buildoutTo run the recipe and generate your project, run$ bin/buildout install pydevprojectThe launch eclipse, import the project and you are ready to go.
To debug, use bin/start_openerp_pydev in the eclipse debug configuration.Supported optionsThese match the options of a PyDev Project.nameThe project name. This is just for Eclipse and can be anything you want.python-versionThe combination of interpreter and grammar version. E.g.python 2.7(default ispython 2.7)python-interpreterThe interpreter name, as configured in the the Eclipse Preferences for PyDev.
UsuallyDefaultis fine.  (default isDefault)Behind the curtainIn addition to the startup scripts and configuration file generated byanybox.recipe.odoo., this recipe
generates the two files that define a PyDev Project:.project.pydevproject.While eggs and their dependencies are declared as external libraries,
the server and its addons are declared as source folders. In the same time,
the recipe uses in background thecollective.recipe.omeletterecipe to build
a unified directory structure of declared addons, symlinking to the actual
contents, in order to allow proper pep8 check and auto completion.
This directory structure is also declared as external dependency to avoid
confusion between source folder and the unified directory structure.It’s a know issue that when same addons are both in the PYTHONPATH and
addons_path (it’s the case with the generated project definition),
it’s not possible to start the server due to import errors. To avoid
this problem, the recipe adds to the generated scripts , specific code
to remove parts of sys.path that are also in addons_path.ContributorsLaurent Mignon (ACSONE SA/NV), AuthorChange history2.0 (2014-12-08)github #5:
Extends anybox.recipe.odoo in place of anybox.recipe.opener1.2 (2014-10-13)github #4:
Pydev > 3.7 and Odoo 8.0 compatibilitygithub #3:
Incorrect Pythonpath in Eclipse1.1 (2014-09-08)github #1:
support new addons layout on github. The eclipse syntax analyser
also scan addons directory at root of the cloned directory if exists. BTW,
code completion is fully functionnal with odoo sources distribution from
github.1.0 (2014-05-30)First release
[ACSONE SA/NV]Download