Metadata-Version: 2.1
Name: odoo12-addon-somconnexio
Version: 12.0.2.1.7
Summary: Odoo Som Connexió customizations
Home-page: https://coopdevs.org
Author: Coopdevs Treball SCCL
License: AGPL-3
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 12.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: correos-preregistro (==0.0.6)
Requires-Dist: correos-seguimiento (==0.0.2)
Requires-Dist: factory-boy
Requires-Dist: faker (==9.3.1)
Requires-Dist: hashids (==1.3.1)
Requires-Dist: odoo12-addon-account-asset-management (==12.0.3.1.5)
Requires-Dist: odoo12-addon-account-banking-sepa-credit-transfer (==12.0.1.0.0.99.dev11)
Requires-Dist: odoo12-addon-account-banking-sepa-direct-debit (==12.0.1.3.0)
Requires-Dist: odoo12-addon-account-chart-update (==12.0.1.0.2.99.dev7)
Requires-Dist: odoo12-addon-account-due-list (==12.0.1.0.0.99.dev9)
Requires-Dist: odoo12-addon-account-financial-report (==12.0.1.4.2.99.dev1)
Requires-Dist: odoo12-addon-account-invoice-validation-queued (==12.0.1.0.0.99.dev3)
Requires-Dist: odoo12-addon-account-payment-mode (==12.0.1.0.1)
Requires-Dist: odoo12-addon-account-payment-order (==12.0.1.6.3)
Requires-Dist: odoo12-addon-account-payment-partner (==12.0.1.0.2)
Requires-Dist: odoo12-addon-account-payment-return (==12.0.2.1.0)
Requires-Dist: odoo12-addon-account-payment-return-import
Requires-Dist: odoo12-addon-account-payment-return-import-iso20022
Requires-Dist: odoo12-addon-base-import-async (==12.0.1.0.0.99.dev10)
Requires-Dist: odoo12-addon-base-rest
Requires-Dist: odoo12-addon-check-concurrent-update (==12.0.1.0.0)
Requires-Dist: odoo12-addon-component-event (==12.0.1.0.0.99.dev11)
Requires-Dist: odoo12-addon-contract-mandate (==12.0.1.0.2)
Requires-Dist: odoo12-addon-contract-payment-mode (==12.0.1.1.0.99.dev4)
Requires-Dist: odoo12-addon-contract (==12.0.7.3.4)
Requires-Dist: odoo12-addon-crm-lead-product (==12.0.1.0.0.99.dev12)
Requires-Dist: odoo12-addon-easy-my-coop-api (==12.0.0.0.1.99.dev22)
Requires-Dist: odoo12-addon-easy-my-coop-es (==12.0.0.0.14)
Requires-Dist: odoo12-addon-easy-my-coop-sponsorship (==12.0.0.0.0-rc2)
Requires-Dist: odoo12-addon-easy-my-coop (==12.0.3.0.2.99.dev2)
Requires-Dist: odoo12-addon-hr-attendance-report-theoretical-time (==12.0.1.5.1)
Requires-Dist: odoo12-addon-hr-holidays-public (==12.0.1.1.1.99.dev3)
Requires-Dist: odoo12-addon-hr-holidays-leave-auto-approve
Requires-Dist: odoo12-addon-l10n-es-account-asset (==12.0.2.0.6)
Requires-Dist: odoo12-addon-l10n-es-account-bank-statement-import-n43 (==12.0.1.0.6)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod111 (==12.0.1.4.0.99.dev1)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod190 (==12.0.1.0.2)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod303 (==12.0.3.2.0.99.dev1)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod347 (==12.0.2.0.0.99.dev2)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod349 (==12.0.1.3.4)
Requires-Dist: odoo12-addon-l10n-es-aeat-mod390 (==12.0.3.1.0)
Requires-Dist: odoo12-addon-l10n-es-aeat (==12.0.2.3.1)
Requires-Dist: odoo12-addon-l10n-es-mis-report (==12.0.1.1.0)
Requires-Dist: odoo12-addon-l10n-es-partner (==12.0.1.0.2)
Requires-Dist: odoo12-addon-l10n-es-toponyms (==12.0.1.0.0.99.dev9)
Requires-Dist: odoo12-addon-mail-activity-board (==12.0.1.0.1)
Requires-Dist: odoo12-addon-mail-activity-done (==12.0.1.1.0)
Requires-Dist: odoo12-addon-mass-editing (==12.0.2.2.0)
Requires-Dist: odoo12-addon-mass-mailing-list-dynamic (==12.0.1.0.3)
Requires-Dist: odoo12-addon-mis-builder-budget (==12.0.3.5.0)
Requires-Dist: odoo12-addon-mis-builder (==12.0.3.6.4)
Requires-Dist: odoo12-addon-partner-firstname (==12.0.1.1.0)
Requires-Dist: odoo12-addon-partner-priority (==12.0.1.0.0.99.dev3)
Requires-Dist: odoo12-addon-product-pack (==12.0.1.0.1.99.dev5)
Requires-Dist: odoo12-addon-queue-job (==12.0.1.5.0)
Requires-Dist: odoo12-addon-server-environment (==12.0.2.0.4)
Requires-Dist: odoo12-addon-web-decimal-numpad-dot (==12.0.1.0.0.99.dev9)
Requires-Dist: odoo12-addon-web-favicon (==12.0.1.0.0.99.dev14)
Requires-Dist: odoo12-addon-web-no-bubble (==12.0.1.0.0.99.dev8)
Requires-Dist: odoo12-addon-web-responsive (==12.0.2.3.2)
Requires-Dist: odoo12-addon-web-searchbar-full-width (==12.0.1.0.0.99.dev6)
Requires-Dist: odoo12-addon-web-widget-open-tab (==12.0.1.0.1.99.dev2)
Requires-Dist: odoo12-addon-web-m2x-options
Requires-Dist: odoo (<12.1dev,>=12.0a)
Requires-Dist: otrs-somconnexio (==0.4.44)
Requires-Dist: pyopencell (==0.4.5)
Requires-Dist: python-stdnum (==1.14)

[![codecov](https://codecov.io/gl/coopdevs/odoo-somconnexio/branch/master/graph/badge.svg?token=ZfxYjFpQBz)](https://codecov.io/gl/coopdevs/odoo-somconnexio)
[![License: AGPL-3](https://img.shields.io/badge/licence-AGPL--3-blue.png)](http://www.gnu.org/licenses/agpl-3.0-standalone.html)
[![Mature](https://img.shields.io/badge/maturity-Mature-brightgreen.png)](https://odoo-community.org/page/development-status)

This project provides an ERP system for [Som Connexio](https://somosconexion.coop/) telecommunication users cooperative.

### Installation

This package requires Odoo v12.0 installed.

You can install this module using `pip`:

```sh
$ pip install odoo12-addon-somconnexio
```

More info in: https://pypi.org/project/odoo12-addon-somconnexio/

### DEVELOPMENT

#### Create development enviornment

Create the `devenv` container with the `somconnexio` module mounted and provision it. Follow the [instructions](https://gitlab.com/coopdevs/odoo-somconnexio-inventory#requirements) in [odoo-somconnexio-inventory](https://gitlab.com/coopdevs/odoo-somconnexio-inventory).

Once created, we can stop or start our `odoo-sc` lxc container as indicated here:
```sh
$ sudo systemctl start lxc@odoo-sc
$ sudo systemctl stop lxc@odoo-sc
```

To check our local lxc containers and their status, run:
```sh
$ 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:
```sh
$ 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
```

To use the local somconnexio module (development version) instead of the PyPI published one, you need to upgrade the [version in the manifest](https://gitlab.com/coopdevs/odoo-somconnexio/-/blob/master/somconnexio/__manifest__.py#L3) 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:
```sh
$ 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.

```sh
$ 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:
```sh
$ ./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:

1. Copy the [.coveragerc](https://github.com/coopdevs/maintainer-quality-tools/blob/master/cfg/.coveragerc) file in your `odoo` base path (`/opt/odoo`) changing the `include` option to the `somconnexio` module path (`/opt/odoo_modules/somconnexio/*`).
2. Go to `/opt/odoo`
3. Run:
```sh
$ 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

###### Contributors

* Coopdevs Treball SCCL


