odoo-helper-scripts documentation
Documentation is work-in-progress, so here is only basic documentation
Quick links:
The War in Ukraine
2022-02-24 Russia invaded Ukraine...
If you want to help or support Ukraine to stand against russian inavasion, please, visit the official site of Ukraine and find the best way to do it.
Thanks.
Overview
This project aims to simplify development process of Odoo addons as much as possible.
odoo-helper-scripts will do all routine operations for you: - install odoo with ALL dependencies (even those not mentioned in odoo's requirements.txt like python-slugify) - manage local development databases - install custom addons - check if versions of modules are updated before pushing changes. - generate / regenerate translations - run tests - and a lot more
If you have any routine operation that you would like to automate with odoo-helper-scripts, just fill an issue or do pull request, and may be that feature will be available in one of next releases.
WARNING: If you want to deploy production-ready odoo server, please, read carefully Usage notes section.
Features
- Easily manage multiple instances of Odoo that ran on same machine
- Wide usage of virtualenv for isolation purpose
- Use nodeenv to install node.js, phantom.js, etc in isolated virtualenv
- The easiest way to install Odoo for development purposes (but not limited to development)
- single command to install odoo
- ability to build custom python for odoo
- Powerful testing capabilities, including support for:
- python and js code check via pylint_odoo (which uses ESLint to check JS files)
- python code check via flake8
- styles (.css, .scss, .less files) check via stylelint
- compute test code coverage via coverage.py
- Test web tours via phantom.js or chromium browser (Odoo 12.0+)
- Easy addons installation
- Automatiacly resolve and fetch dependencies
- oca_dependencies.txt (sample, mqt tool code)
- requirements.txt
- Own file format to track addon dependencies: odoo_requirements.txt
- installation directly from Odoo Market (experimental)
- Only free addons
- Including dependencies
- Semi-automatic upgrade when new version released
- installation from git repositories
- installation of python dependencies from PyPI or any vcs supported by setuptools
- automatically processing of requirements.txt files located inside repository root and addon directories.
- shortcuts that simplifies fetching addons from OCA or github
- works good with long recursive dependencies. One of the reasons for this script collection development was, ability to automaticaly install more that 50 addons, that depend on each other, and where each addon have it's own git repo.
- Automatiacly resolve and fetch dependencies
- Easy database management
- easily create / drop / backup / rename / copy databases
- Continious Integration related features
- ensure addon version changed
- ensure repository version changed
- ensure each addon have icon
- ensure all changed addon has correct versions
- simplify forward-port process (move changes from older serie to newer (for example from 11.0 to 12.0))
- Translation management from command line
- import / export translations by command from shell
- test translation rate for specified language
- regenerate translations for specified language
- generate .pot files for modules
- load language (for one db or for old databases)
- Supported odoo versions:
- 8.0
- 9.0
- 10.0
- 11.0
- 12.0
- 13.0
- 14.0
- 15.0
- 16.0
- 17.0 (Experimental)
- OS support:
- On Ubuntu should work nice
- Also should work on Debian based systems, but some troubles may happen with installation of system dependencies.
- Other linux systems - in most cases should work, but system dependecies must be installed manualy.
- Missed feature? Fill an issue
Usage note
This script collection is designed to simplify life of addons developer. This project is not designed, to install and configure production ready Odoo instances, unless you know what you do!
For production-ready installations take a look at crnd-deploy project - just a single command allows you to get production-ready odoo instance with configured PostgreSQL and Nginx.
Also take a look at Yodoo Cockpit project, and discover the easiest way to manage your production Odoo installations.
Just short notes about Yodoo Cockpit: - start new production-ready odoo instance in 1-2 minutes. - add custom addons to your odoo instances in 5-10 minutes. - out-of-the-box email configuration: just press button and add some records to your DNS, and get a working email - make your odoo instance available to external world (internet) in 30 seconds (just add single record in your DNS)
Level up your service quality
Level up your service with Helpdesk / Service Desk / ITSM solution by CR&D.
Just test it at yodoo.systems: choose template you like, and start working.
Test all available features of Bureaucrat ITSM with this template.
Installation
For full list of installation options look at installation documentation or Quick Start Guide
odoo-helper-scripts could be installed as .deb packages, but this feature is still in alpha. See releases page.*
To install odoo-helper-scripts system-wide do folowing:
# Install odoo-helper-scripts
wget -O - https://gitlab.com/katyukha/odoo-helper-scripts/raw/master/install-system.bash | sudo bash -s
# Install system dependencies required for odoo-helper-scripts
# NOTE: Works only on debian-based systems
odoo-helper install pre-requirements
or more explicit way:
# Download installation script
wget -O /tmp/odoo-helper-install.bash https://gitlab.com/katyukha/odoo-helper-scripts/raw/master/install-system.bash;
# Install odoo-helper-scripts
sudo bash /tmp/odoo-helper-install.bash;
# Intall system pre-requirements for odoo-helper-scripts
# NOTE: Works only on debian-based systems
odoo-helper install pre-requirements
Do not forget to install and configure postgres:
# install postgres and create db user with name 'odoo' and password 'odoo'
odoo-helper install postgres odoo odoo
Basic usage
odoo-install
Install Odoo in specified directory (using virtualenv)
odoo-helper install sys-deps 11.0 # install global system dependencies for specified version of Odoo
odoo-install --odoo-version 11.0 # no sudo required
After this you will have odoo and it's dependencies installed into odoo-11.0 directory.
This installation also creates odoo-helper.conf file inside project, which allows to use odoo-helper script to simplify interaction with this odoo installation.
Description of odoo-helper project's directory structure is here
odoo-helper
This is the main script to manage Odoo instances installed by odoo-install
Most of odoo-helper-scripts functionality is implemented as subcommands of odoo-helper
.
For example odoo-helper server
contains server management commands like:
odoo-helper server start
odoo-helper server stop
odoo-helper server restart
- etc
All odoo-helper commands may be splited in two groups:
- Odoo instance management commands
- Other
Odoo instance management commands are commands that manage Odoo instances installed using odoo-install
script.
Example of such commands may be: odoo-helper server
or odoo-helper db
commands.
These commands are required to be ran inside Odoo instance directory (directory with Odoo installed using odoo-install
)
or its subdirectories. Thusodoo-helper could find project/instance config file.
See Frequently used commands and Command reference for more info about available commands
or just run odoo-helper --help
Support
Have you any quetions? Just fill an issue or send email