Bash zeroincombenze lib


Keywords
bash, optargs
License
AGPL-1.0
Install
pip install z0lib==1.0.9

Documentation

Zeroincombenze tools 2.0

github.com Coverage License: AGPL-3

Overview / Panoramica

en Multi-purpose python & bash tools

Multi-purpose python and bash source code.

These tools help to cover the following areas of software:

  • Odoo deployment
  • Odoo database maintenance (creation and upgrade, massive)
  • Odoo database profiling (auto)
  • Database check (auto & massive)
  • Development
  • Documentation
  • Testing

You can find more info at https://zeroincombenze-tools.readthedocs.io/

Compatibility

These tools are designed to be used on Linux platforms. They are tested on following distros: * Ubuntu: from 12.0 to 20.0 * Debian: from 8.0 to 10.0 * CentOS: from 7 to 8 Currently the osx Darwin is in testing.

Components

Package Name Brief Area
clodoo check_4_seq.sh Check for postgres database index maintenance
  clodoo.py Massive operations on multiple Odoo DBs in cloud. It is used to create configurated Odoo DBs and to upgrade more DBs at the same time. No (yet) documented maintenance
  force_password.sh Force Odoo DB password maintenance
  inv2draft_n_restore.py Force an invoice to draft state even if is paid and restore original state and payment (Odoo < 9.0) maintenance
  list_requirements.py List pypi and bin packages for an Odoo installation deployment
  manage_db Massive operations to multiple Odoo DBs in cloud, data based on csv files. maintenance
  manage_odoo Manage an Odoo installation maintenance
  odoo_install_repository Install & upgrade odoo repository Deployment & maintenance
  set_workers.sh Evaluate and set Odoo workers for best performance Deployment & maintenance
lisa lisa Linux Installer Simple App. LAMP and odoo server installer from scratch. deployment
odoo_score odoo_score.py Odoo ORM super core development
  odoo_shell.py Odoo shell for Odoo versions from 6.1 to 13.0 Development & maintenance
os0   Simple os interface checked for OpenVMS too development
python-plus python-plus Various features to python 2 and python 3 programs as integration of pypi future to help to port your code from Python 2 to Python 3 development
  vem Virtual Environment Manager: create, copy, move, merge and many other functions with virtual environments Deployment & maintenance
travis_emulator travis Travis Emulator on local machine. Check your project before release on TravisCi testing
wok_code cvt_csv_to_rst.py Convert a csv file into rst text file with table inside documentation
  cvt_csv_to_xml.py Convert a csv file into xml file for Odoo module data development
  cvt_script Make bash script to standard development
  gen_readme.py Generate README.rst, index.html and __openerp__.py ,documentation documentation
  odoo_dependencies.py Show Odoo module tree, ancestors and/or childs development
  odoo_translation.py Load Odoo translation (deprecated, must be replaced by weblate) development
  please Developer shell development
  topep8 Convert python and xml file across Odoo versions development
  vfdiff Make difference between 2 files or directories development
wok_news   Undocumented (deprecated)  
z0bug_odoo z0bug_odoo Integration of zerobug and Odoo. Initially forked form OCA maintainer quality tools. It works with all Odoo version, from 6.1 to 13.0 testing
z0lib   General purpose bash & python library development
zar zar Zeroincombenze Archive and Replica. Backup your Odoo DBs maintenance
zerobug zerobug testing & debug library testing

Odoo vid

The odoo_vid is mainly the directory with a specific Odoo instance in multi instance environment. Imagine a scenario with different Odoo instance running on the same host. This is the development environment or the test environment. Every instance of Odoo must have a own configuration file and packages. Based on configuration file, every Odoo instance must have a own xmlrcp port, db user, log file, pid file, etcetera.

The odoo_vid provides a simple way to manage multiple Odoo instance. Supplying odoo_vid you select the specific parameters values just in one item.

The odoo_vid item is composed by:

  • Prefix "VENV" if virtual environment
  • Prefix V to identify main instance
  • Odoo distribution (for organizations with short name)
  • Odoo version (full version or major version)
  • Odoo distribution (all organizzations)
  • User specific identification

Odoo distribution is on of: flectra,librerp,oca,powerp,zero or nothing

Odoo version is the Odoo specific version; it is one value of: 14.0 13.0 12.0 11.0 10.0 9.0 8.0 7.0 6.1

Examples of valid odoo_vid:

  • 12.0 -> Odoo 12.0, unidentified distribution
  • oca14 -> Odoo 14.0, distribution oca (short name)
  • librerp6 -> Odoo 6.1, distribution librerp (short name)
  • odoo14-oca -> Odoo 14.0, distribution oca (full name)
  • odoo12-devel -> Odoo 12.0, odoo ditribution, user identification "devel"

Based on above information, tool software can assume the right value of specific Odoo instance.

This table shows the Odoo parameter values based on odoo_vid; notice the symbol %M meaans Odoo major version and %V Odoo version.

Parameter name standard value anonymous distro zeroincombenze d oca distro axitec distro Note
ROOT (Odoo root)   ~/%V ~/zero%M ~/oca%M ~/odoo_%M i.e. ~/oca14
CONFN (configuration file) odoo.conf odoo-server.conf odoo%M-server.conf odoo%M-zero.conf odoo%M-oca.conf odoo%M-axi.conf Directory /etc/odoo (see Odoo structure)
USER (db user) odoo odoo%M odoo%M odoo%M odoo%M i.e odoo12
FLOG (log file) odoo.log odoo-server.log odoo%M-server.log odoo%M-zero.log odoo%M-oca.log odoo%M-axi.log Directory /var/log/odoo
FPID (pid file) odoo.pid odoo-server.pid odoo%M-server.pid odoo%M-zero.pid odoo%M-oca.pid odoo%M-axi.pid Directory /var/run/odoo
RPCPORT (xmlrpc port) 8069 8160 + %M 8460 + %M 8260 + %M 8360 + %M  
LPPORT (longpolling) 8072 8130 + %M 8430 + %M 8230 + %M 8330 + %M  
SVCNAME (service name) odoo odoo-server odoo%M odoo%M-server odoo%M-zero odoo%M-oca odoo%M-axi  

it Strumenti Python & bash

Codice vario python & bash



Getting started

Try Me


Installation

Installation

Zeroincombenze tools require:

  • Linux Centos 7/8 or Debian 9/10 or Ubuntu 18/20
  • python 2.7, some tools require python 3.6+
  • bash 5.0+

Current version via Git

cd $HOME
git clone https://github.com/zeroincombenze/tools.git
cd ./tools
./install_tools.sh -p
source /opt/odoo/devel/activate_tools

Upgrade

Upgrade

Current stable version

cd $HOME
./install_tools.sh -U
source /opt/odoo/devel/activate_tools

Current development version

cd $HOME
./install_tools.sh -Ud
source /opt/odoo/devel/activate_tools

History

zerobug: 2.0.2 (2022-10-20)

  • [IMP] Stable version

zar: 2.0.0 (2022-10-20)

  • [IMP] Stable version

z0lib: 2.0.0.4.1 (2022-10-20)

  • [FIX] run_traced: wrong execution for "cd <path>; ..."
  • [IMP] CFG_init 'ALL': set ODOO_ROOT

z0bug_odoo: 2.0.2 (2022-10-20)

  • [IMP] Stable version

wok_code: 2.0.2 (2022-10-20)

  • [IMP] Clearing code

travis_emulator: 2.0.2 (2022-10-20)

  • [IMP] database name: (test|template)_odoo

python_plus: 2.0.2 (2022-10-20)

  • [FIX] vem: wrong behavior with > o < in version
  • [IMP] list_requirements.py: "Crypto.Cipher": "pycrypto"

os0: 2.0.1 (2022-10-20)

  • [IMP] Stable version

odoo_score: 2.0.2 (2022-10-20)

  • [FIX] run_odoo_debug: test function improvements

lisa: 2.0.2 (2022-10-20)

  • [FIX] liba_bld_ods: fixes & improvements

clodoo: 2.0.2 (2022-10-20)

  • [FIX] odoorc: GITORGID and other value, sometimes are wrong

z0bug_odoo: 2.0.0.1 (2022-10-15)

  • [FIX] Crash in travis

clodoo: 2.0.1.1 (2022-10-15)

  • [IMP] Minor improvements

odoo_score: 2.0.1.1 (2022-10-13)

  • [IMP] run_odoo_debug: python stub
  • [FIX] run_odoo_debug: crash in sime rare cases

zerobug: 2.0.1 (2022-10-12)

  • [IMP] stable version

wok_code: 2.0.1 (2022-10-12)

  • [IMP] stable version

travis_emulator: 2.0.1 (2022-10-12)

  • [IMP] stable version

python_plus: 2.0.1 (2022-10-12)

  • [IMP] stable version

odoo_score: 2.0.1 (2022-10-12)

  • [IMP] stable version

lisa: 2.0.1 (2022-10-12)

  • [IMP] lisa_bld_ods: stable version

clodoo: 2.0.1 (2022-10-12)

  • [IMP] stable version

clodoo: 2.0.0.3 (2022-10-06)

  • [IMP] odoorc: best virtual environment recognize
  • [FIX] odoorc: SVCNAME

zerobug: 2.0.0.2 (2022-10-05)

  • [IMP] travis_install_env: python2 tests

z0lib: 2.0.0.4 (2022-10-05)

  • [IMP] python2 tests

wok_code: 2.0.0.4 (2022-10-05)

  • [IMP] New lint_2_compare command
  • [IMP] odoo_dependecies.py: minor upgrade

odoo_score: 2.0.0.3 (2022-10-05)

  • [IMP] run_odoo_debug: test via pycharm
  • [FIX] run_odoo_debug: concurrent tests

travis_emulator: 2.0.0.2 (2022-10-04)

  • [IMP] travis: python2 tests

z0lib: 2.0.0.3 (2022-09-30)

  • [FIX] run_traced return code

lisa: 2.0.0.2 (2022-09-29)

  • [IMP] lisa_bld_ods: improvements

odoo_score: 2.0.0.2 (2022-09-22)

  • [IMP] run_odo_debug: test with random rpcport for multiple tests
  • [IMP] odoo_shell.py: new actions

z0lib: 2.0.0.2 (2022-09-14)

  • [IMP] run_traced for python apps

wok_code: 2.0.0.3 (2022-09-14)

  • [FIX] deploy_odoo: show actual branch and organization
  • [FIX] deploy_odoo: update read from directory
  • [IMP] deploy_odoo: new command list repo info
  • [IMP] deploy_odoo: new feature link to repositories

python_plus: 2.0.0.3 (2022-09-14)

  • [FIX] vem: install package with list_requirements.py

clodoo: 2.0.0.2 (2022-09-14)

  • [IMP] list_requirements.py: get data from setup.py od Odoo

wok_code: 2.0.0.2 (2022-09-10)

  • [FIX] deploy_odoo: add path in addons_path of directory exists
  • [FIX] deploy_odoo: clone oca repositories with --single-branch option
  • [IMP] manage_pypi: improvements
  • [FIX] please lint|test

python_plus: 2.0.0.2 (2022-09-10)

  • [FIX] vem: no input inquire

lisa: 2.0.0.1 (2022-09-10)

  • [IMP] wsl2-systemd: experimental systemd for wsl2

wok_code: 2.0.0.1 (2022-09-07)

  • [FIX] please test: with debug

odoo_score: 2.0.0.1 (2022-09-07)

  • [FIX] run_odo_debug with debug
  • [IMP] run_odoo_debug: experimental debug via pycharm

zerobug: 2.0.0.1 (2022-09-06)

  • [FIX] travis_install_env: minor fixes
  • [IMP] z0testlib: show coverage result

z0lib: 2.0.0.1 (2022-09-06)

  • [IMP] set_pybin accept filename
  • [IMP] check_pythonpath removed

travis_emulator: 2.0.0.1 (2022-09-06)

  • [IMP] travis: new improvements (-f -k switches)

python_plus: 2.0.0.1 (2022-09-06)

  • [IMP] vem: new swith -d for Odoo dependencies path
  • [FIX] vem: create with best package list
  • [FIX] vem: install odoo/openerp

clodoo: 2.0.0.1 (2022-09-06)

  • [IMP] list_requirements.py: new option -S for secure packages

Credits

Copyright

SHS-AV s.r.l. <https://www.shs-av.com/>


Last Update / Ultimo aggiornamento: 2022-10-22