Development tools
Various tools at your fingertips.
The available tools are:
cvt_csv_2_rst.py: convert csv file into rst file
cvt_csv_2_xml.py: convert csv file into xml file
cvt_script: parse bash script and convert to meet company standard
gen_readme.py: generate documentation files, mainly README.rst
odoo_dependency.py: show odoo dependencies and/or Odoo module tree
odoo_translation.py: manage Odoo translation
pep8: parse source .py file to meet pep8 and convert across Odoo versions
please: developer shell
wget_odoo_repositories.py: get repository names from github.com
please: developer shell
please is an interactive developer shell aim to help development and testing software.
Usage: please [-hB][-b branch][-c file][-d diff][-fjk][-L logfile][-mn][-o prj_id][-O][-p path][-qr][-s files][-tuVv] actions sub1 sub3 sub3
Developer shell
Action may be on of:
help|build|chkconfig|commit|config|distribution|docs|download_rep|duplicate|edit|export|import|list|lsearch|publish|push|pythonhosted|synchro|replace|replica|show|status|test|translate|version|wep
-h this help, type 'please help' for furthermore info
-B debug mode
-b branch branch: must be 6.1 7.0 8.0 9.0 10.0 11.0 12.0 13.0 or 14.0
-c file configuration file (def .travis.conf)
-d diff date to search in log
-f force copy (of commit/push) | build (of register/publish) | dup doc (of distribution/synchro) | full (status)
-j execute tests in project dir rather in test dir/old style synchro
-k keep coverage statistics in annotate test/keep original repository | tests/ in publish
-L logfile log file name
-m show missing line in report coverage
-n do nothing (dry-run)
-o prj_id push only external project ids (of push)
-O pull original README (and docs) in distribution (deprecated)
-p path declare local destination path
-q silent mode
-r run restricted mode (w/o parsing travis.yml file) | recurse distribution OCB
-s files files to include in annotate test
-t test mode (implies dry-run)
-u check for unary operator W503 or no OCA/zero module translation
-V show version end exit
-v verbose mode
Action is one of:
help
build
chkconfig
config
docs
duplicate
export MODULE DB
import
list
lsearch
publish
push
pythonhosted
replace
replica
show
status
test
translate MODULE DB
version
wep
build
Build a tar file for current PYPI project
chkconfig
Display various values of current project.
config global|local
Set various parameter by edit with vim. Set various parameter editing with vim. Comments inside configuration file can aim to set values.
Some variable are:
GBL_EXCLUDE=test_impex -> Module globally escluded by test because can fail locally
PYTHON_MATRIX=”2.7 3.7” -> python version to use in tests
docs
Prepare documentation to publish on readthedocs website (PYPI). Create / update README and index.html of Odoo module. Notice: README of repository history is tailored with last 60 days items; on README and index,html of module, history is tailored with last 180 days items; However max 12 items are added in README / index.html Summary showed to console are tailored with last 15 days.
export MODULE DB [-bBRANCH]
Export po file of Odoo project. If current directory is a module directory you can use ‘.’ (dot) for module name.
To declare specific version use -b switch
import MODULE DB
Import po file of Odoo project.
To declare target version use fB-bfR switch
publish docs|download|pypi|svg|testpypi
Publish documentation or package.
publish docs -> publish generate docs to website (require system privileges)
- publish download -> publish tarball to download (require system privileges)
type fBplease buildfR to generate tarball file
publish pypi -> publish package to pypi website (from odoo user)
publish svg -> publish test result svg file (require system privileges)
publish tar -> write a tarball with package files
gen_readme.py: documentation generator
Use this software to generate the project or module documentation. You can create the README.rst of OCB, repository and modules of Odoo projects. You can also generate the index.html of Odoo module.
You can even create the README.rst of PYPI projects. This document was generated by this tool itself.
The tool is supplied with follow templates:
Odoo README.rst: to generare README of Odoo repository o module
PYPI README.rst: to generate README of pypi package
index.html: to generate Odoo module index.html
__openerp__.py: to update __openerp__.py of Odoo < 8.0 with description
templates
This tool read a template and write the document (usually named README.rst). The template can contains macro which format is {{macro_name}}.
Currently, the follow macros are recognized:
acknowledges |
Acknowledges list |
authors |
Authors list |
available_addons |
N/D |
branch |
Odoo version for this repository/module |
certifications |
Certificates list |
contact_us |
Contact informations |
contributors |
Contributors list |
configuration |
How to configure |
copyright_notes |
Copyright notes |
description |
English description of the repository/module (mandatory) |
descrizione |
Descrizione modulo/progetto in italiano (obbligatoria) |
doc-URL |
URL for button documentation |
faq |
Frequently asked questions |
features |
Features of the repository/module |
GPL |
same of gpl |
git_orgid |
Git organization |
gpl |
License name: may be A-GPL or L-GPL |
grymb_image_* |
Symbol imagae (suffix is a supported symbol name) |
help-URL |
URL for button help |
history |
Changelog history |
known_issues |
Known issues |
include |
files included (space separated) to read before writing document |
installation |
How to install |
name |
Module name (must be a python name) |
now |
Create timestamp |
maintenance |
Maintenance information |
maturity |
Maturity status (alpha, beta, etc.) |
module_name |
Module name |
OCA-URL |
URL to the same repository/module of OCA in github.com |
oca_diff |
OCA comparation |
odoo_fver |
Odoo full version (deprecated) |
odoo_majver |
Odoo major version; internal use to set some values |
odoo_layer |
Document layer, may be: ocb, module or repository |
prerequisites |
Installation prerequisites |
prior_branch |
Previous Odoo version of this repository/module |
prior2_branch |
Previous Odoo version of previous repository/module |
proposals_for_enhancement |
Proposals for enhancement text |
pypi_modules |
pypi module list (may be set in __manifest__.rst) |
pypi_sects |
pypi section names to import (may be set in __manifest__.rst) |
repos_name |
Repository/project name |
sponsor |
Sponsors list |
sommario |
Traduzione italiana di summary |
submodules |
Sub module list (space separated) to document (only in pypi projects) |
summary |
Repository/module summary (CR are translated into spaces) |
support |
Support informations |
today |
Create date |
translators |
Translators list |
troubleshooting |
Troubleshooting information |
try_me-URL |
URL for button try-me |
upgrade |
How to upgrade |
usage |
How to usage |
Documentation may contains some graphical symbols in format |symbol|. Currently, follows symbols are recognized:
check
DesktopTelematico
en
exclamation
FatturaPA
halt
info
it
late
menu
no_check
right_do
same
warning
xml_schema
odoo_dependecies.py: show odoo dependencies
Show information about odoo dependencies and module tree.
pep8: python edit utility
Parse source file to meet pep8 requirements. The pep8 utility makes some source transformation based on rules, then can execute autoflake8 and/or autopep8 utilities (if installed) to meet full pep8 requirements.
It is an helper to meet z0bug_odoo LINT_LEVEL requirements.
This module is part of tools project.
Last Update / Ultimo aggiornamento: 2023-04-14