Setup#
Create virtual environment#
This step will cover the installation of tryton from a developer perspective. We will assume that you are already fluent with venv and pip.
Let’s create a virtual environment inside your working directory:
$ python -m venv .venv
$ source .venv/bin/activate
Setup module#
The Tryton template can be rendered into a module with:
$ cookiecutter hg+https://code.tryton.org/tryton --directory cookiecutter-module
module_name [my_module]: opportunity
prefix []: tuto
package_name [tuto_opportunity]:
version []: x.y.0
description []:
author [Tryton]: John Doe
author_email [bugs@tryton.org]: john@example.com
fullname []: John Doe
url [http://www.tryton.org/]: http://www.example.com/
keywords []:
test_with_scenario []:
Note
The version number must use the same two first numbers as the Tryton series wanted.
Install module#
Now we can install the new module in editable mode:
$ python -m pip install --editable opportunity
Continue with initializing the database