Package: odut
odutOdoo utility functions with commnd line interfaces.1.Before runing the scripts, make sure you have activated your virtual enviroment,
and installed the dependencies:pip3 install-rrequirements.txtFeatures1. Safely remove dependencies of the Odoo modules…
you can either pass modules in a list from the cmd line, or you can just use a file
with the modules listed in the first line of the file.Install the package from the sourcepip3 install odutWindows:$ odut --modules "['account', 'crm']" --base_dir 'Path to your addons'Macos/Linux:$ odut --modules "['account', 'crm']" --base_dir 'Path to your addons'DeploymentStart a PostgreSQL server$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10Start an Odoo instance$ docker run -p 8069:8069 --name odoo --link db:db -t odoo(Optional)Delete unnecessary modules$ docker exec -it --user root odoo bash
$ pip3 install --upgrade pip
$ pip3 install odut
$ # incase of: ImportError: cannot import name 'main'
$ hash -d pip3 # multiple times!
$ alias odut=./var/lib/odoo/.local/bin/odut
$ find . -name '*odoo*' # to find the odoo addons using find.
$ # usually in this directory ./usr/lib/python3/dist-packages/odoo/addons/
$ odut --modules "['crm', 'inventory', 'sales']" --base_dir '/usr/lib/python3/dist-packages/odoo/addons/'Stop and restart an Odoo instance$ docker stop odoo
$ docker start -a odooPackaging UpLocallyDevelop mode:$ # testing locally in development mode.
$ python setup.py develop

$ python setup.py develop --uninstallEditable Mode:$ pip install -e .This is similar to runningpython setup.py developin that it
installs your package using a symlink to your development code.Packaging up to Pypi(Optional) Bumpversion:$ bumpversion --allow-dirty --current-version 1.4.0  minor setup.pyCreate the distribution file:$ python3 setup.py sdist bdist_wheelrun commands to check the errors:$ twine check dist/*Uploading to Pypi:$ python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*Re Upload to pypichange the version number in setup.py and __init__.py file:$ rm -r dist/
$ rm -r build/then, redo the procedures.Caution:dist file of same name cannot be uploaded again.https://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/introduction.htmlTesthttps://docs.pytest.org/en/latest/goodpractices.htmlAbout setup.pypython setup.py install is used to install (typically third party) packages that you’re not going
to develop/modify/debug yourself.For your own stuff, you want to first install your package and then be able to frequently edit
the code without having to re-install the package every time — and that is exactly what python
setup.py develop does:it installs the package (typically just a source folder) in a way that allows you to
conveniently edit your code after it’s installed to the (virtual) environment,
and have the changes take effect immediately.Note that it is highly recommended to use pip install . (install) and pip install -e . (developer install)
to install packages, as invoking setup.py directly will do the wrong things for many dependencies, such as pull
prereleases and incompatible package versions, or make the package hard to uninstall with pip.Creditsminglyupolimi@gmail.comHistory0.1.0 (2019-06-29)First release on PyPI.