This project provides an ERP system for Som Connexio telecommunication users cooperative.
Installation
This package requires Odoo v12.0 installed.
You can install this module using pip:
$ pip install odoo12-addon-somconnexio
More info in: https://pypi.org/project/odoo12-addon-somconnexio/
DEVELOPMENT
Configure local development environment
First of all, to start to development, we need to create a virtualenv in our local machine to install the pre-commit dependencies. Using a virtualenv with Python 3.7, we install the pre-commit hooks to execute the linters (and in the future the formatter).
In your local environment, where you execute the git commit ... command, run:
- Install
pyenv
curl https://pyenv.run | bash
- Build the Python version
pyenv install 3.7.7
- Create a virtualenv
pyenv virtualenv 3.7.7 odoo-somconnexio
- Activate the virtualenv
pyenv activate odoo-somconnexio
- Install dependencies
pip install pre-commit
- Install pre-commit hooks
pyenv exec pre-commit install
Create development enviornment (LXC Container)
Create the devenv container with the somconnexio module mounted and provision it. Follow the instructions in odoo-somconnexio-inventory.
Once created, we can stop or start our odoo-sc lxc container as indicated here:
$ sudo systemctl start lxc@odoo-sc
$ sudo systemctl stop lxc@odoo-sc
To check our local lxc containers and their status, run:
$ sudo lxc-ls -f
Start the ODOO application
Enter to your local machine as the user odoo, activate the python enviornment first and run the odoo bin:
$ ssh odoo@odoo-sc.local
$ pyenv activate odoo
$ cd /opt/odoo
$ set -a && source /etc/default/odoo && set +a
$ ./odoo-bin -c /etc/odoo/odoo.conf -u somconnexio -d odoo --workers 0
To use the local somconnexio module (development version) instead of the PyPI published one, you need to upgrade the version in the manifest and then update the module with -u in the Odoo CLI.
Restart ODOO database from scratch
Enter to your local machine as the user odoo, activate the python enviornment first, drop the DB, and run the odoo bin to create it again:
$ ssh odoo@odoo-sc.local
$ pyenv activate odoo
$ dropdb odoo
$ cd /opt/odoo
$ ./odoo-bin -c /etc/odoo/odoo.conf -i somconnexio -d odoo --stop-after-init
Deploy branch
For tests purposes, we might want to deploy a given branch (BRANCH) into a server (staging), instead of publishing a new package release just to test some fix or new feature.
To do so, we need to enter into the server with an authorized user (), and then switch to odoo user to install with pip the package version found in the git branch.
$ ssh <USER>@staging-odoo.somconnexio.coop
$ sudo su - odoo
$ cd /opt/odoo
$ pyenv activate odoo
$ pip install -e git+https://gitlab.com/coopdevs/odoo-somconnexio@<BRANCH>#egg=odoo12-addon-somconnexio\&subdirectory=setup/somconnexio
At this point we need to restart Odoo to load the new installed module version.
$ sudo systemctl stop odoo
$ ./odoo-bin -c /etc/odoo/odoo.conf -u somconnexio -d odoo --stop-after-init --logfile /dev/stdout
$ sudo systemctl start odoo
To restart the odoo service it is better to stop it, execute odoo with the upgrade (-u) option and start it again, rather that just restart it, in case there are changes in views within the deployed branch.
Run tests
You can run the tests with this command:
$ ./odoo-bin -c /etc/odoo/odoo.conf -u somconnexio -d odoo --stop-after-init --test-enable --workers 0
The company data is rewritten every module upgrade
Run tests with coverage
You can run the tests with a coverage report following the nexts steps:
- Copy the .coveragerc file in your
odoobase path (/opt/odoo) changing theincludeoption to thesomconnexiomodule path (/opt/odoo_modules/somconnexio/*). - Go to
/opt/odoo - Run:
$ coverage run odoo-bin -c /etc/odoo/odoo.conf -u somconnexio -d odoo --stop-after-init --test-enable --workers 0 && coverage report --show-missing
Update CHANGELOG without running pipeline
If you need to update the CHANGELOG but you don't need to wait for the pipeline to end, you can put [skip ci] in your commit message and the pipeline will be skiped.
More info in https://docs.gitlab.com/ee/ci/yaml/#skip-pipeline
Credits
Authors
- Coopdevs Treball SCCL
- Som Connexió SCCL
Contributors
- Coopdevs Treball SCCL
- Som Connexió SCCL
Metadata
Release files for odoo12-addon-somconnexio 12.0.2.13.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odoo12-addon-somconnexio-12.0.2.13.3.tar.gz | 748.7 kB | Without provenance | Details for odoo12-addon-somconnexio-12.0.2.13.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo12_addon_somconnexio-12.0.2.13.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for odoo12_addon_somconnexio-12.0.2.13.3-py2.py3-none-any.whl |
Total release size: 1.7 MB
Release files / odoo12-addon-somconnexio-12.0.2.13.3.tar.gz
| Download URL | odoo12-addon-somconnexio-12.0.2.13.3.tar.gz |
|---|---|
| Size | 748.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f91ef457b051cdb2cd99c1dcf0b5454f4cec5a2ab21982233e738368277cac74
|
|
BLAKE2b-256 checksum How to use checksums |
86fef7b18326ce970c131a911b5cdbf41ad28305ca546cf5f62040c6a2534ccf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Release files / odoo12_addon_somconnexio-12.0.2.13.3-py2.py3-none-any.whl
| Download URL | odoo12_addon_somconnexio-12.0.2.13.3-py2.py3-none-any.whl |
|---|---|
| Size | 963.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0cefe38b811a322b04bedcd8577c58a7b68e8f49f1eb58d1d8759dc0e6f49be6
|
|
BLAKE2b-256 checksum How to use checksums |
a42d5fb609ef96f452062b7936cf047c0791025d9a72b049df3654d24fbad9dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Security for odoo12-addon-somconnexio 12.0.2.13.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.