diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8156129..9fea8a4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -33,7 +33,7 @@ repos:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
-# - id: check-xml
+ - id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/pre-commit/mirrors-pylint
diff --git a/README.md b/README.md
index b131c49..a6a0372 100644
--- a/README.md
+++ b/README.md
@@ -19,13 +19,15 @@ Available addons
addon | version | summary
--- | --- | ---
[easy_my_coop](easy_my_coop/) | 12.0.3.0.1 | Manage your cooperative shares
+[easy_my_coop_api](easy_my_coop_api/) | 12.0.0.0.1 | Open Easy My Coop to the world: RESTful API.
[easy_my_coop_be](easy_my_coop_be/) | 12.0.1.2.0 | Easy My Coop Belgium Localization
[easy_my_coop_ch](easy_my_coop_ch/) | 12.0.1.0.2 | Easy My Coop Switzerland localization
+[easy_my_coop_es](easy_my_coop_es/) | 12.0.0.0.13 | Easy My Coop Spain
[easy_my_coop_fr](easy_my_coop_fr/) | 12.0.1.0.1 | This is the french localization for the easy my coop module
[easy_my_coop_loan](easy_my_coop_loan/) | 12.0.1.0.1 | This module allows to manage the bonds and subordinated loans subscription life cycle.
[easy_my_coop_loan_website](easy_my_coop_loan_website/) | 12.0.1.0.1 | This module implements the subscription page for bonds and subordinated loans.
[easy_my_coop_taxshelter_report](easy_my_coop_taxshelter_report/) | 12.0.1.0.1 | This module allows you to create a fiscal declaration year and to print tax shelter declaration for each cooperator.
-[easy_my_coop_website](easy_my_coop_website/) | 12.0.1.0.0 | This module adds the cooperator subscription form allowing to subscribe for shares online.
+[easy_my_coop_website](easy_my_coop_website/) | 12.0.1.0.3 | This module adds the cooperator subscription form allowing to subscribe for shares online.
[easy_my_coop_website_portal](easy_my_coop_website_portal/) | 12.0.1.0.0 | Show cooperator information in the website portal.
[partner_age](partner_age/) | 12.0.2.0.0 | This module computes the age of the partner.
[theme_light](theme_light/) | 12.0.1.0.0 | extract of the theme zen
diff --git a/easy_my_coop/README.rst b/easy_my_coop/README.rst
index 1cfbefa..4cca8dc 100644
--- a/easy_my_coop/README.rst
+++ b/easy_my_coop/README.rst
@@ -32,6 +32,26 @@ Please don't hesitate to suggest one of your modules to this project.
.. contents::
:local:
+Installation
+============
+
+## Deploying with pip
+
+We used [odoo setup tools](https://pypi.org/project/setuptools-odoo/#packaging-a-single-addon) to generate the pypi files from the odoo manifests. To deploy any packaged module, so that odoo can later install them,
+you can create a venv with this name (it's git-ignored)
+```shell
+python -m venv venv
+```
+And then pip-install them [from pypi](https://pypi.org/user/coopdevs/).
+
+### Example
+
+For instance, for the addon `easy_my_coop_website_portal`
+```shell
+pip install odoo12-addon-easy-my-coop-website-portal==12.0.1.0.0.99.dev9
+```
+Beware that for word separation, pypi uses dashes `-` and odoo underscores `_`.
+
Bug Tracker
===========
diff --git a/easy_my_coop/__manifest__.py b/easy_my_coop/__manifest__.py
index f53712b..2a91490 100644
--- a/easy_my_coop/__manifest__.py
+++ b/easy_my_coop/__manifest__.py
@@ -25,10 +25,6 @@
"category": "Cooperative management",
"website": "https://www.coopiteasy.be",
"license": "AGPL-3",
- "description": """
- This module allows to manage the cooperator subscription and all the
- cooperative business processes.
- """,
"data": [
"data/easy_my_coop_data.xml",
"data/paperformat.xml",
diff --git a/easy_my_coop/description.rst b/easy_my_coop/readme/INSTALL.rst
similarity index 99%
rename from easy_my_coop/description.rst
rename to easy_my_coop/readme/INSTALL.rst
index 33db7e8..5482873 100644
--- a/easy_my_coop/description.rst
+++ b/easy_my_coop/readme/INSTALL.rst
@@ -14,4 +14,3 @@ For instance, for the addon `easy_my_coop_website_portal`
pip install odoo12-addon-easy-my-coop-website-portal==12.0.1.0.0.99.dev9
```
Beware that for word separation, pypi uses dashes `-` and odoo underscores `_`.
-
diff --git a/easy_my_coop/static/description/icon.svg b/easy_my_coop/static/description/icon.svg
index 2c59dc5..9cb20ae 100644
--- a/easy_my_coop/static/description/icon.svg
+++ b/easy_my_coop/static/description/icon.svg
@@ -11,23 +11,23 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/easy_my_coop/static/description/index.html b/easy_my_coop/static/description/index.html
index a5570e3..dea9e37 100644
--- a/easy_my_coop/static/description/index.html
+++ b/easy_my_coop/static/description/index.html
@@ -380,17 +380,34 @@ ul.auto-toc {
Table of contents
+
+
+
## Deploying with pip
+
We used [odoo setup tools](https://pypi.org/project/setuptools-odoo/#packaging-a-single-addon) to generate the pypi files from the odoo manifests. To deploy any packaged module, so that odoo can later install them,
+you can create a venv with this name (it’s git-ignored)
+`shell
+python -m venv venv
+`
+And then pip-install them [from pypi](https://pypi.org/user/coopdevs/).
+
### Example
+
For instance, for the addon easy_my_coop_website_portal
+`shell
+pip install odoo12-addon-easy-my-coop-website-portal==12.0.1.0.0.99.dev9
+`
+Beware that for word separation, pypi uses dashes - and odoo underscores _.
+
-
+
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
@@ -398,21 +415,21 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
This module is part of the coopiteasy/vertical-cooperative project on GitHub.
You are welcome to contribute.
diff --git a/easy_my_coop/tests/test_base.py b/easy_my_coop/tests/test_base.py
index cc4c023..f34b113 100644
--- a/easy_my_coop/tests/test_base.py
+++ b/easy_my_coop/tests/test_base.py
@@ -6,8 +6,165 @@ import odoo.tests.common as common
class EMCBaseCase(common.TransactionCase):
+ @classmethod
+ def setUpClass(cls, *args, **kwargs):
+ super().setUpClass(*args, **kwargs)
+
+ def _chart_template_create(self):
+ transfer_account_id = self.env["account.account.template"].create(
+ {
+ "code": "000",
+ "name": "Liquidity Transfers",
+ "reconcile": True,
+ "user_type_id": self.env.ref(
+ "account.data_account_type_current_assets"
+ ).id,
+ }
+ )
+ self.chart = self.env["account.chart.template"].create(
+ {
+ "name": "Test COA",
+ "code_digits": 4,
+ "bank_account_code_prefix": 1014,
+ "cash_account_code_prefix": 1014,
+ "currency_id": self.env.ref("base.USD").id,
+ "transfer_account_code_prefix": "000",
+ }
+ )
+ transfer_account_id.update({"chart_template_id": self.chart.id})
+ self.env["ir.model.data"].create(
+ {
+ "res_id": transfer_account_id.id,
+ "model": transfer_account_id._name,
+ "name": "Liquidity Transfers",
+ }
+ )
+ act = self.env["account.account.template"].create(
+ {
+ "code": "001",
+ "name": "Expenses",
+ "user_type_id": self.env.ref(
+ "account.data_account_type_expenses"
+ ).id,
+ "chart_template_id": self.chart.id,
+ "reconcile": True,
+ }
+ )
+ self.env["ir.model.data"].create(
+ {"res_id": act.id, "model": act._name, "name": "expenses"}
+ )
+ act = self.env["account.account.template"].create(
+ {
+ "code": "002",
+ "name": "Product Sales",
+ "user_type_id": self.env.ref(
+ "account.data_account_type_revenue"
+ ).id,
+ "chart_template_id": self.chart.id,
+ "reconcile": True,
+ }
+ )
+ self.env["ir.model.data"].create(
+ {"res_id": act.id, "model": act._name, "name": "sales"}
+ )
+ act = self.env["account.account.template"].create(
+ {
+ "code": "003",
+ "name": "Account Receivable",
+ "user_type_id": self.env.ref(
+ "account.data_account_type_receivable"
+ ).id,
+ "chart_template_id": self.chart.id,
+ "reconcile": True,
+ }
+ )
+ self.env["ir.model.data"].create(
+ {"res_id": act.id, "model": act._name, "name": "receivable"}
+ )
+ act = self.env["account.account.template"].create(
+ {
+ "code": "004",
+ "name": "Account Payable",
+ "user_type_id": self.env.ref(
+ "account.data_account_type_payable"
+ ).id,
+ "chart_template_id": self.chart.id,
+ "reconcile": True,
+ }
+ )
+ self.env["ir.model.data"].create(
+ {"res_id": act.id, "model": act._name, "name": "payable"}
+ )
+
+ def _add_chart_of_accounts(self):
+ self.company = self.env.user.company_id
+ self.chart.try_loading_for_current_company()
+ self.revenue = self.env["account.account"].search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_revenue").id,
+ )
+ ],
+ limit=1,
+ )
+ self.expense = self.env["account.account"].search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_expenses").id,
+ )
+ ],
+ limit=1,
+ )
+ self.receivable = self.env["account.account"].search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_receivable").id,
+ )
+ ],
+ limit=1,
+ )
+ self.payable = self.env["account.account"].search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_payable").id,
+ )
+ ],
+ limit=1,
+ )
+ self.equity_account = self.env.ref("easy_my_coop.account_equity_demo")
+ self.cooperator_account = self.env.ref(
+ "easy_my_coop.account_cooperator_demo"
+ )
+ return True
+
+ def _journals_setup(self):
+ self.subscription_journal = self.env.ref(
+ "easy_my_coop.subscription_journal"
+ )
+ self.subscription_journal.write(
+ {
+ "default_debit_account_id": self.equity_account.id,
+ "default_credit_account_id": self.equity_account.id,
+ }
+ )
+ self.bank_journal = self.env["account.journal"].search(
+ [("type", "=", "bank")], limit=1
+ )
+ return True
+
def setUp(self):
super(EMCBaseCase, self).setUp()
+ self._chart_template_create()
+ self._add_chart_of_accounts()
+ self._journals_setup()
def as_user(self):
self.uid = self.ref("base.user_demo")
diff --git a/easy_my_coop/views/menus.xml b/easy_my_coop/views/menus.xml
index 90fc57f..fd01a02 100644
--- a/easy_my_coop/views/menus.xml
+++ b/easy_my_coop/views/menus.xml
@@ -5,8 +5,8 @@
-->
+ groups="easy_my_coop.group_easy_my_coop_user" sequence="40"
+ web_icon="easy_my_coop,static/description/icon.png" />