Skip to main content
Version: Tryton 7.0 (LTS)

1. Reproducible environment

Tryton 7.0 · versioned practical course

Objectives

  • separate runtime, database, and source code
  • initialize a disposable training database
  • repeat commands without depending on hidden workstation state

Mental model

A development environment is part of the product. If another person cannot recreate it, a passing test on one laptop is weak evidence.

Guided practice

  1. Create a dedicated virtual environment or development container.
  2. Install the server and modules from the same Tryton series.
  3. Use SQLite for the first exercise and PostgreSQL before validating production behavior.
  4. Create a database, activate the module, and keep the exact commands in the project README.

Minimal example

python -m venv .venv
. .venv/bin/activate
python -m pip install "trytond~=7.0.0" "trytond_company~=7.0.0"
export TRYTOND_DATABASE_URI=sqlite://
trytond-admin -d training --all
trytond -d training

How to read the example

Replace VERSION with the selected documentation series. The compatible-release constraint keeps the package inside that series. For PostgreSQL, configure TRYTOND_DATABASE_URI explicitly and never commit credentials.

Exercise

Recreate the database from an empty directory, record the server URL, and prove that a second developer can repeat the process.

Run the exercise first with a minimal valid case, then add an invalid case and turn both into repeatable tests.

Verifiable result

The server starts, the database can be selected, and no command depends on a globally installed Tryton package.

Common mistakes

  • mixing server and module series
  • using production data for exercises
  • assuming SQLite proves PostgreSQL migrations
  • storing database secrets in Git

Ready-to-advance criteria

  • I can explain the concepts without looking at the code.
  • Valid and invalid cases have tests.
  • I tested with a non-administrative user.
  • I know how to upgrade and restore the training database.

Version and references

Series 7.0 requires at least Python 3.8 according to official metadata. This official branch still carries historical metadata in setup.py; preserve series compatibility while preparing custom packages for standard python -m build builds. Do not confuse this historical minimum with the Python version certified by your organization.

This edition pins examples and dependencies to series 7.0. Check the official 7.0 tutorial, server API, and source branch before moving a pattern to production.