Customizations for Som Connexió ERP.
Project description
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 odoo-addon-somconnexio
More info in: https://pypi.org/project/odoo-addon-somconnexio/
Development
Configure local development environment
First of all, to start 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 environment (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 environment 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 environment 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 (<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 next steps:
Copy the coveragerc file in your odoo base path (/opt/odoo) changing the include option to the somconnexio module 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 skipped. More info in https://docs.gitlab.com/ee/ci/yaml/#skip-pipeline
Contributors
Som Connexió SCCL <https://somconnexio.coop/>
Gerard Funonsas gerard.funosas@somconnexio.coop
Borja Gimeno borja.gimeno@somconnexio.coop
Coopdevs Treball SCCL <https://coopdevs.coop/>
Daniel Palomar daniel.palomar@coopdevs.org
César López cesar.lopez@coopdevs.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file odoo_addon_somconnexio-16.0.1.0.24.tar.gz.
File metadata
- Download URL: odoo_addon_somconnexio-16.0.1.0.24.tar.gz
- Upload date:
- Size: 673.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a67428d34e954dad4c3039f6b7f16238b4e9ccf10694e0ccbddde604d03f67b
|
|
| MD5 |
c9a7341e170515df8923e42fad95ac7d
|
|
| BLAKE2b-256 |
4af50a8c466e9be3ae1bca3962285f54cbaa62802a897487db72eda662ff9583
|