From 5885fb2e97d5530d160a79260b42e568af45154b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicola=CC=81s=20Ramos?= Date: Thu, 31 Oct 2024 10:30:54 +0100 Subject: [PATCH] [IMP] cooperator: Add specific income account for share increase Fix pre-commit --- cooperator/README.rst | 335 +++++++++--------- cooperator/__manifest__.py | 1 + cooperator/models/__init__.py | 1 + cooperator/models/product_category.py | 13 + cooperator/models/product_template.py | 7 + cooperator/models/subscription_request.py | 18 +- cooperator/readme/CONTRIBUTORS.md | 11 + cooperator/readme/CONTRIBUTORS.rst | 10 - .../{DESCRIPTION.rst => DESCRIPTION.md} | 7 +- cooperator/readme/HISTORY.md | 160 +++++++++ cooperator/readme/HISTORY.rst | 133 ------- cooperator/readme/ROADMAP.md | 25 ++ cooperator/readme/ROADMAP.rst | 23 -- cooperator/readme/USAGE.md | 5 + cooperator/readme/USAGE.rst | 3 - cooperator/static/description/index.html | 282 ++++++++------- cooperator/tests/test_cooperator.py | 41 ++- cooperator/views/product_category_view.xml | 19 + cooperator/views/product_view.xml | 25 +- 19 files changed, 648 insertions(+), 471 deletions(-) create mode 100644 cooperator/models/product_category.py create mode 100644 cooperator/readme/CONTRIBUTORS.md delete mode 100644 cooperator/readme/CONTRIBUTORS.rst rename cooperator/readme/{DESCRIPTION.rst => DESCRIPTION.md} (92%) create mode 100644 cooperator/readme/HISTORY.md delete mode 100644 cooperator/readme/HISTORY.rst create mode 100644 cooperator/readme/ROADMAP.md delete mode 100644 cooperator/readme/ROADMAP.rst create mode 100644 cooperator/readme/USAGE.md delete mode 100644 cooperator/readme/USAGE.rst create mode 100644 cooperator/views/product_category_view.xml diff --git a/cooperator/README.rst b/cooperator/README.rst index 261cff0eb..71b7c36bf 100644 --- a/cooperator/README.rst +++ b/cooperator/README.rst @@ -2,39 +2,30 @@ Cooperators =========== -.. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:fc9abf44c53ec9ed50ac717e7fa26489ddc8765fd713c8db92f40bc077d5b1ce + !! source digest: sha256:bcd0cdca7fa63893786aa9d7e18370edd1cb1c9c08dfaa7765559ad3c3402609 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png +.. |badge_devstat| image:: https://img.shields.io/badge/maturity-beta-brightgreen.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcooperative-lightgray.png?logo=github - :target: https://github.com/OCA/cooperative/tree/16.0/cooperator - :alt: OCA/cooperative -.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator - :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/cooperative&target_branch=16.0 - :alt: Try me on Runboat - -|badge1| |badge2| |badge3| |badge4| |badge5| + +.. |badge_license| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :alt: AGPL-3 + +|badge_devstat| |badge_license| Manage cooperators of a cooperative. A basic flow can be the following: - Create subscription request for a person (moral or physical) -- Validate subscription request, a capital release request (an invoice: `account.move`). - This invoice is sent to the future cooperator. +- Validate subscription request, a capital release request (an invoice: + account.move). This invoice is sent to the future cooperator. - Payment of the cooperator is registered and the capital Release request is marked as paid. - A new cooperator (a special partner) is created, and the right type @@ -56,7 +47,8 @@ Features: Configurations: -- on the company, set a default payment term for the capital release requests. +- on the company, set a default payment term for the capital release + requests. - on the company, set the cooperator account. **Table of contents** @@ -67,219 +59,244 @@ Configurations: Usage ===== -See the `documentation `_ (not available in english ATM). +See the +`documentation `__ +(not available in english ATM). A localization module is needed with this module. Known issues / Roadmap ====================== -Gather and consolidate all cooperator settings in the application parameters. +Gather and consolidate all cooperator settings in the application +parameters. Consider a refactoring for: -#. removing a potential redundancy between the boolean field "representative" - and the address type "representative". -#. prevent new contacts to have the representative address type, if they are - not representative. +1. removing a potential redundancy between the boolean field + "representative" and the address type "representative". +2. prevent new contacts to have the representative address type, if they + are not representative. -See `this issue `_. +See `this +issue `__. -Known caveat: the cooperator localization modules will have to be split in -order to install the ``cooperator`` module without the ``cooperator_website`` -module. +Known caveat: the cooperator localization modules will have to be split +in order to install the ``cooperator`` module without the +``cooperator_website`` module. -A “Cooperative Memberships” page should be added to the ``res.partner`` form, -displaying all the cooperative memberships of the partner -(``cooperative_membership_ids``). The page should only be visible for users -that are both in the ``cooperator_group_user`` group and in the -``base.group_multi_company`` group (how to do this?). Should it display the -memberships of all companies or only the ones in which the user is “logged in” -(checked in the menu)? If all companies, there would be a conflict with the -``cooperative_membership_rule_company`` ``ir.rule``. +A “Cooperative Memberships” page should be added to the ``res.partner`` +form, displaying all the cooperative memberships of the partner +(``cooperative_membership_ids``). The page should only be visible for +users that are both in the ``cooperator_group_user`` group and in the +``base.group_multi_company`` group (how to do this?). Should it display +the memberships of all companies or only the ones in which the user is +“logged in” (checked in the menu)? If all companies, there would be a +conflict with the ``cooperative_membership_rule_company`` ``ir.rule``. Changelog ========= 16.0.1.0.2 (2024-03-12) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Remove duplicated member field in ``res.partner`` form view. (`#47 `_) - +- Remove duplicated member field in ``res.partner`` form view. + (`#47 `__) 16.0.1.0.0 (2023-11-29) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Add a "Share Type" column to the cooperator register report. (`#86 `_) -- Add a new "Registers" menu entry and move the "Subscription Register" menu - entry there. (`#86 `_) -- Use default filters instead of domains in contact views. (`#86 `_) -- Merge the confirmation email template for individuals and companies into one. (`#86 `_) -- Rename some files and XML IDs to improve consistency. (`#86 `_) -- Update email templates to the default Odoo layout (what also makes them - shorter). (`#86 `_) -- Add a description to email templates. (`#86 `_) -- Move the "Cooperator Candidates" menu entry to the "Cooperators" menu. (`#86 `_) +- Add a "Share Type" column to the cooperator register report. + (`#86 `__) +- Add a new "Registers" menu entry and move the "Subscription Register" + menu entry there. + (`#86 `__) +- Use default filters instead of domains in contact views. + (`#86 `__) +- Merge the confirmation email template for individuals and companies + into one. (`#86 `__) +- Rename some files and XML IDs to improve consistency. + (`#86 `__) +- Update email templates to the default Odoo layout (what also makes + them shorter). + (`#86 `__) +- Add a description to email templates. + (`#86 `__) +- Move the "Cooperator Candidates" menu entry to the "Cooperators" menu. + (`#86 `__) - Add a new "Cooperator Register" view (and menu entry) to display the - cooperative memberships and allow to print the cooperator register (report - that was previously on the partner model). (`#86 `_) -- Make the capital release request report inherit from the invoice report - instead of copying and modifying it. (`#86 `_) - + cooperative memberships and allow to print the cooperator register + (report that was previously on the partner model). + (`#86 `__) +- Make the capital release request report inherit from the invoice + report instead of copying and modifying it. + (`#86 `__) **Bugfixes** - Ensure that only shares related to the current company appear on the - cooperator certificate. (`#86 `_) -- Ensure reversals of capital release requests use a name prefix to not clash - with normal entries ("RSUBJ" instead of "SUBJ"). (`#86 `_) -- Fix subscription requests created by transfer operations: ensure that no - confirmation email is sent, that they don't appear in the list of subscription - requests and cannot be erroneously validated. (`#86 `_) -- Fix the display of the first name in email templates and add tests to cover - this. (`#86 `_) -- Fix error when creating a new partner from the normal partner form. (`#86 `_) -- Fix the layout of all reports by rewriting them from the default invoice - layout. (`#86 `_) -- Ensure creating a cooperator for a non-current company works (when a capital - release request is paid). (`#86 `_) -- Ensure that ``share.line.share_number`` cannot be negative. (`#86 `_) -- Don't send a cooperator certificate if there are no remaining shares after an - operation. (`#86 `_) -- Fix the company name in confirmation email template: display the name of the - company that made the subscription request instead of the name of the - cooperative. (`#86 `_) -- Ensure that the company_type value of a subscription request is copied to the - legal_form field of the created partner. (`#86 `_) -- Add unique per-company constraints on the cooperator register number and the - operation register number. (`#86 `_) -- Fix copyright statements: add missing ones and use the same format everywhere. (`#86 `_) -- Fix consistency of XML files: XML declaration, spacing. (`#86 `_) + cooperator certificate. + (`#86 `__) +- Ensure reversals of capital release requests use a name prefix to not + clash with normal entries ("RSUBJ" instead of "SUBJ"). + (`#86 `__) +- Fix subscription requests created by transfer operations: ensure that + no confirmation email is sent, that they don't appear in the list of + subscription requests and cannot be erroneously validated. + (`#86 `__) +- Fix the display of the first name in email templates and add tests to + cover this. (`#86 `__) +- Fix error when creating a new partner from the normal partner form. + (`#86 `__) +- Fix the layout of all reports by rewriting them from the default + invoice layout. + (`#86 `__) +- Ensure creating a cooperator for a non-current company works (when a + capital release request is paid). + (`#86 `__) +- Ensure that ``share.line.share_number`` cannot be negative. + (`#86 `__) +- Don't send a cooperator certificate if there are no remaining shares + after an operation. + (`#86 `__) +- Fix the company name in confirmation email template: display the name + of the company that made the subscription request instead of the name + of the cooperative. + (`#86 `__) +- Ensure that the company_type value of a subscription request is copied + to the legal_form field of the created partner. + (`#86 `__) +- Add unique per-company constraints on the cooperator register number + and the operation register number. + (`#86 `__) +- Fix copyright statements: add missing ones and use the same format + everywhere. (`#86 `__) +- Fix consistency of XML files: XML declaration, spacing. + (`#86 `__) - Display an error message instead of failing when trying to create a - subscription request from a partner and no default share product is found. (`#86 `_) -- Rename internal string value of "Blocked" subscription request state from - ``block`` to ``blocked``. (`#86 `_) -- Ensure per-company sequences are used (for the cooperator register number and - the operation register number). (`#86 `_) -- Prevent to create a subscription request where Email and Company Email have - the same value, to avoid trying to create a recursive partner hierarchy when - validating the subscription request (the partner being the parent of itself). (`#86 `_) -- Fix the footer layout to add company logos: wrap the original layout instead - of overwriting it. (`#86 `_) -- Fix required company fields on subscription request form. (`#86 `_) - + subscription request from a partner and no default share product is + found. (`#86 `__) +- Rename internal string value of "Blocked" subscription request state + from ``block`` to ``blocked``. + (`#86 `__) +- Ensure per-company sequences are used (for the cooperator register + number and the operation register number). + (`#86 `__) +- Prevent to create a subscription request where Email and Company Email + have the same value, to avoid trying to create a recursive partner + hierarchy when validating the subscription request (the partner being + the parent of itself). + (`#86 `__) +- Fix the footer layout to add company logos: wrap the original layout + instead of overwriting it. + (`#86 `__) +- Fix required company fields on subscription request form. + (`#86 `__) **Deprecations and Removals** -- Remove the extra columns in the contacts list view; they can now be found in - the cooperator register. (`#86 `_) +- Remove the extra columns in the contacts list view; they can now be + found in the cooperator register. + (`#86 `__) - Remove deprecated ``subscription.request.create_comp_sub_req()``. Use - the normal ``subscription.request.create()`` instead. (`#86 `_) -- Remove the useless "subscription" operation request type. (`#86 `_) - + the normal ``subscription.request.create()`` instead. + (`#86 `__) +- Remove the useless "subscription" operation request type. + (`#86 `__) 14.0.2.0.0 (2023-07-25) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Each company now has their own mail templates for cooperator-related e-mails. If - no template is set, the default (global) template is used. (`#73 `_) -- ir.sequences used by this module are no longer global; each company has its own - sequence for cooperator memberships. (`#74 `_) -- Create subscription journal per company. (`#75 `_) -- Improve multi-company consistency by setting ``company_id`` on records where - needed and adding the ``check_company`` flag on ``Many2one`` fields. (`#77 `_) -- ir.rules for multi-company usage added. Users cannot access records of this - module if they are not members of the relevant company. (`#78 `_) +- Each company now has their own mail templates for cooperator-related + e-mails. If no template is set, the default (global) template is used. + (`#73 `__) +- ir.sequences used by this module are no longer global; each company + has its own sequence for cooperator memberships. + (`#74 `__) +- Create subscription journal per company. + (`#75 `__) +- Improve multi-company consistency by setting ``company_id`` on records + where needed and adding the ``check_company`` flag on ``Many2one`` + fields. (`#77 `__) +- ir.rules for multi-company usage added. Users cannot access records of + this module if they are not members of the relevant company. + (`#78 `__) - Move cooperative membership properties from ``res.partner`` to new - ``cooperative.membership`` model and add company-dependent computed fields on - ``res.partner`` for backward compatibility. (`#82 `_) - + ``cooperative.membership`` model and add company-dependent computed + fields on ``res.partner`` for backward compatibility. + (`#82 `__) 14.0.1.6.0 (2023-02-23) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Features** -- Removed all selection widgets. (`#55 `_) - +- Removed all selection widgets. + (`#55 `__) 12.0.5.3.0 (2022-09-05) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Improved Documentation** -- Adding USAGE.rst to inform that localization modules are necessary. (`#346 `_) - +- Adding USAGE.rst to inform that localization modules are necessary. + (`#346 `__) 12.0.5.0.0 (2022-06-23) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Deprecations and Removals** -- When no cooperator account is defined on the company, this module previously - defaulted to the account with code '416000'. This behaviour has been removed - because the code is Belgian-only. The functionality has been moved to - ``l10n_be_cooperator``. (`#314 `_) - +- When no cooperator account is defined on the company, this module + previously defaulted to the account with code '416000'. This behaviour + has been removed because the code is Belgian-only. The functionality + has been moved to ``l10n_be_cooperator``. + (`#314 `__) 12.0.3.3.2 (2022-06-20) -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- **Bugfixes** -- Fix name computation crash (`#330 `_) - -Bug Tracker -=========== - -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 to smash it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. +- Fix name computation crash + (`#330 `__) Credits ======= Authors -~~~~~~~ +------- * Coop IT Easy SC Contributors -~~~~~~~~~~~~ - -* `Coop IT Easy SC `_: +------------ - * Houssine Bakkali - * Robin Keunen - * Rémy Taymans - * Victor Champonnois - * Vincent Van Rossem - * Manuel Claeys Bouuaert - * Carmen Bianca Bakker - * hugues de keyzer +- `Coop IT Easy SC `__: -Maintainers -~~~~~~~~~~~ + - Houssine Bakkali + - Robin Keunen + - Rémy Taymans + - Victor Champonnois + - Vincent Van Rossem + - Manuel Claeys Bouuaert + - Carmen Bianca Bakker + - hugues de keyzer -This module is maintained by the OCA. +- 'Som IT Cooperatiu SCCL' -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org + - Nicolás Ramos -OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use. +Maintainers +----------- -This module is part of the `OCA/cooperative `_ project on GitHub. +This module is maintained by Som IT Cooperatiu SCCL. -You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. +Contact the maintainer through their official support channels in case you find +any issues with this module. diff --git a/cooperator/__manifest__.py b/cooperator/__manifest__.py index 593a7100f..851103ff6 100644 --- a/cooperator/__manifest__.py +++ b/cooperator/__manifest__.py @@ -40,6 +40,7 @@ "views/operation_request_view.xml", "views/account_move_views.xml", "views/product_view.xml", + "views/product_category_view.xml", "views/res_company_view.xml", "views/account_journal_views.xml", "views/cooperative_membership_view.xml", diff --git a/cooperator/models/__init__.py b/cooperator/models/__init__.py index f1b70f3ff..e450515fe 100644 --- a/cooperator/models/__init__.py +++ b/cooperator/models/__init__.py @@ -16,3 +16,4 @@ from . import share_line from . import subscription_register from . import subscription_request +from . import product_category diff --git a/cooperator/models/product_category.py b/cooperator/models/product_category.py new file mode 100644 index 000000000..2998f0e27 --- /dev/null +++ b/cooperator/models/product_category.py @@ -0,0 +1,13 @@ +from odoo import fields, models + + +class ProductCategory(models.Model): + _inherit = "product.category" + + property_account_income_increase_categ_id = fields.Many2one( + "account.account", + company_dependent=True, + string="Income Account for Share Increase", + domain="[('deprecated', '=', False), ('company_id', '=', current_company_id)]", + help="This account will be used when validating a share increase subscription request instead of the default income account", + ) diff --git a/cooperator/models/product_template.py b/cooperator/models/product_template.py index 976cea340..c8439b70d 100644 --- a/cooperator/models/product_template.py +++ b/cooperator/models/product_template.py @@ -18,6 +18,13 @@ class ProductTemplate(models.Model): by_company = fields.Boolean(string="Can be subscribed by companies?") by_individual = fields.Boolean(string="Can be subscribed by individuals?") mail_template = fields.Many2one("mail.template", string="Mail template") + property_account_income_increase_id = fields.Many2one( + "account.account", + company_dependent=True, + string="Income Account for Share Increase", + domain="[('deprecated', '=', False), ('company_id', '=', current_company_id)]", + help="This account will be used when validating a share increase subscription request instead of the default income account", + ) def get_web_share_products(self, is_company): if is_company is True: diff --git a/cooperator/models/subscription_request.py b/cooperator/models/subscription_request.py index afa646ffd..2d0a9c3ea 100644 --- a/cooperator/models/subscription_request.py +++ b/cooperator/models/subscription_request.py @@ -531,10 +531,20 @@ def _prepare_invoice_line(self, move_id, product, partner, qty): # request for a company other than the current one, which can happen # when a user is "logged in" to multiple companies. product = product.with_company(self.company_id) - account = ( - product.property_account_income_id - or product.categ_id.property_account_income_categ_id - ) + + if self.type == "increase": + account = ( + product.property_account_income_increase_id + or product.categ_id.property_account_income_increase_categ_id + or product.property_account_income_id + or product.categ_id.property_account_income_categ_id + ) + else: + account = ( + product.property_account_income_id + or product.categ_id.property_account_income_categ_id + ) + if not account: raise UserError( _( diff --git a/cooperator/readme/CONTRIBUTORS.md b/cooperator/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..985b8e4d7 --- /dev/null +++ b/cooperator/readme/CONTRIBUTORS.md @@ -0,0 +1,11 @@ +- [Coop IT Easy SC](https://coopiteasy.be): + - Houssine Bakkali + - Robin Keunen + - Rémy Taymans + - Victor Champonnois + - Vincent Van Rossem + - Manuel Claeys Bouuaert + - Carmen Bianca Bakker + - hugues de keyzer +- 'Som IT Cooperatiu SCCL' + - Nicolás Ramos diff --git a/cooperator/readme/CONTRIBUTORS.rst b/cooperator/readme/CONTRIBUTORS.rst deleted file mode 100644 index c3e148a98..000000000 --- a/cooperator/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,10 +0,0 @@ -* `Coop IT Easy SC `_: - - * Houssine Bakkali - * Robin Keunen - * Rémy Taymans - * Victor Champonnois - * Vincent Van Rossem - * Manuel Claeys Bouuaert - * Carmen Bianca Bakker - * hugues de keyzer diff --git a/cooperator/readme/DESCRIPTION.rst b/cooperator/readme/DESCRIPTION.md similarity index 92% rename from cooperator/readme/DESCRIPTION.rst rename to cooperator/readme/DESCRIPTION.md index 0ebfcfcc1..ab6e9cc12 100644 --- a/cooperator/readme/DESCRIPTION.rst +++ b/cooperator/readme/DESCRIPTION.md @@ -3,8 +3,8 @@ Manage cooperators of a cooperative. A basic flow can be the following: - Create subscription request for a person (moral or physical) -- Validate subscription request, a capital release request (an invoice: `account.move`). - This invoice is sent to the future cooperator. +- Validate subscription request, a capital release request (an invoice: + account.move). This invoice is sent to the future cooperator. - Payment of the cooperator is registered and the capital Release request is marked as paid. - A new cooperator (a special partner) is created, and the right type @@ -26,5 +26,6 @@ Features: Configurations: -- on the company, set a default payment term for the capital release requests. +- on the company, set a default payment term for the capital release + requests. - on the company, set the cooperator account. diff --git a/cooperator/readme/HISTORY.md b/cooperator/readme/HISTORY.md new file mode 100644 index 000000000..0692e2c2b --- /dev/null +++ b/cooperator/readme/HISTORY.md @@ -0,0 +1,160 @@ +## 16.0.1.0.2 (2024-03-12) + +**Bugfixes** + +- Remove duplicated member field in `res.partner` form view. + ([\#47](https://github.com/OCA/cooperative/issues/47)) + +## 16.0.1.0.0 (2023-11-29) + +**Features** + +- Add a "Share Type" column to the cooperator register report. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Add a new "Registers" menu entry and move the "Subscription Register" + menu entry there. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Use default filters instead of domains in contact views. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Merge the confirmation email template for individuals and companies + into one. ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Rename some files and XML IDs to improve consistency. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Update email templates to the default Odoo layout (what also makes + them shorter). ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Add a description to email templates. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Move the "Cooperator Candidates" menu entry to the "Cooperators" menu. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Add a new "Cooperator Register" view (and menu entry) to display the + cooperative memberships and allow to print the cooperator register + (report that was previously on the partner model). + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Make the capital release request report inherit from the invoice + report instead of copying and modifying it. + ([\#86](https://github.com/OCA/cooperative/issues/86)) + +**Bugfixes** + +- Ensure that only shares related to the current company appear on the + cooperator certificate. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Ensure reversals of capital release requests use a name prefix to not + clash with normal entries ("RSUBJ" instead of "SUBJ"). + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix subscription requests created by transfer operations: ensure that + no confirmation email is sent, that they don't appear in the list of + subscription requests and cannot be erroneously validated. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix the display of the first name in email templates and add tests to + cover this. ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix error when creating a new partner from the normal partner form. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix the layout of all reports by rewriting them from the default + invoice layout. ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Ensure creating a cooperator for a non-current company works (when a + capital release request is paid). + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Ensure that `share.line.share_number` cannot be negative. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Don't send a cooperator certificate if there are no remaining shares + after an operation. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix the company name in confirmation email template: display the name + of the company that made the subscription request instead of the name + of the cooperative. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Ensure that the company_type value of a subscription request is copied + to the legal_form field of the created partner. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Add unique per-company constraints on the cooperator register number + and the operation register number. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix copyright statements: add missing ones and use the same format + everywhere. ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix consistency of XML files: XML declaration, spacing. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Display an error message instead of failing when trying to create a + subscription request from a partner and no default share product is + found. ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Rename internal string value of "Blocked" subscription request state + from `block` to `blocked`. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Ensure per-company sequences are used (for the cooperator register + number and the operation register number). + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Prevent to create a subscription request where Email and Company Email + have the same value, to avoid trying to create a recursive partner + hierarchy when validating the subscription request (the partner being + the parent of itself). + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix the footer layout to add company logos: wrap the original layout + instead of overwriting it. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Fix required company fields on subscription request form. + ([\#86](https://github.com/OCA/cooperative/issues/86)) + +**Deprecations and Removals** + +- Remove the extra columns in the contacts list view; they can now be + found in the cooperator register. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Remove deprecated `subscription.request.create_comp_sub_req()`. Use + the normal `subscription.request.create()` instead. + ([\#86](https://github.com/OCA/cooperative/issues/86)) +- Remove the useless "subscription" operation request type. + ([\#86](https://github.com/OCA/cooperative/issues/86)) + +## 14.0.2.0.0 (2023-07-25) + +**Features** + +- Each company now has their own mail templates for cooperator-related + e-mails. If no template is set, the default (global) template is used. + ([\#73](https://github.com/OCA/cooperative/issues/73)) +- ir.sequences used by this module are no longer global; each company + has its own sequence for cooperator memberships. + ([\#74](https://github.com/OCA/cooperative/issues/74)) +- Create subscription journal per company. + ([\#75](https://github.com/OCA/cooperative/issues/75)) +- Improve multi-company consistency by setting `company_id` on records + where needed and adding the `check_company` flag on `Many2one` fields. + ([\#77](https://github.com/OCA/cooperative/issues/77)) +- ir.rules for multi-company usage added. Users cannot access records of + this module if they are not members of the relevant company. + ([\#78](https://github.com/OCA/cooperative/issues/78)) +- Move cooperative membership properties from `res.partner` to new + `cooperative.membership` model and add company-dependent computed + fields on `res.partner` for backward compatibility. + ([\#82](https://github.com/OCA/cooperative/issues/82)) + +## 14.0.1.6.0 (2023-02-23) + +**Features** + +- Removed all selection widgets. + ([\#55](https://github.com/OCA/cooperative/issues/55)) + +## 12.0.5.3.0 (2022-09-05) + +**Improved Documentation** + +- Adding USAGE.rst to inform that localization modules are necessary. + ([\#346](https://github.com/coopiteasy/vertical-cooperative/issues/346)) + +## 12.0.5.0.0 (2022-06-23) + +**Deprecations and Removals** + +- When no cooperator account is defined on the company, this module + previously defaulted to the account with code '416000'. This behaviour + has been removed because the code is Belgian-only. The functionality + has been moved to `l10n_be_cooperator`. + ([\#314](https://github.com/coopiteasy/vertical-cooperative/issues/314)) + +## 12.0.3.3.2 (2022-06-20) + +**Bugfixes** + +- Fix name computation crash + ([\#330](https://github.com/coopiteasy/vertical-cooperative/issues/330)) diff --git a/cooperator/readme/HISTORY.rst b/cooperator/readme/HISTORY.rst deleted file mode 100644 index e04cb66b1..000000000 --- a/cooperator/readme/HISTORY.rst +++ /dev/null @@ -1,133 +0,0 @@ -16.0.1.0.2 (2024-03-12) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Remove duplicated member field in ``res.partner`` form view. (`#47 `_) - - -16.0.1.0.0 (2023-11-29) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Add a "Share Type" column to the cooperator register report. (`#86 `_) -- Add a new "Registers" menu entry and move the "Subscription Register" menu - entry there. (`#86 `_) -- Use default filters instead of domains in contact views. (`#86 `_) -- Merge the confirmation email template for individuals and companies into one. (`#86 `_) -- Rename some files and XML IDs to improve consistency. (`#86 `_) -- Update email templates to the default Odoo layout (what also makes them - shorter). (`#86 `_) -- Add a description to email templates. (`#86 `_) -- Move the "Cooperator Candidates" menu entry to the "Cooperators" menu. (`#86 `_) -- Add a new "Cooperator Register" view (and menu entry) to display the - cooperative memberships and allow to print the cooperator register (report - that was previously on the partner model). (`#86 `_) -- Make the capital release request report inherit from the invoice report - instead of copying and modifying it. (`#86 `_) - - -**Bugfixes** - -- Ensure that only shares related to the current company appear on the - cooperator certificate. (`#86 `_) -- Ensure reversals of capital release requests use a name prefix to not clash - with normal entries ("RSUBJ" instead of "SUBJ"). (`#86 `_) -- Fix subscription requests created by transfer operations: ensure that no - confirmation email is sent, that they don't appear in the list of subscription - requests and cannot be erroneously validated. (`#86 `_) -- Fix the display of the first name in email templates and add tests to cover - this. (`#86 `_) -- Fix error when creating a new partner from the normal partner form. (`#86 `_) -- Fix the layout of all reports by rewriting them from the default invoice - layout. (`#86 `_) -- Ensure creating a cooperator for a non-current company works (when a capital - release request is paid). (`#86 `_) -- Ensure that ``share.line.share_number`` cannot be negative. (`#86 `_) -- Don't send a cooperator certificate if there are no remaining shares after an - operation. (`#86 `_) -- Fix the company name in confirmation email template: display the name of the - company that made the subscription request instead of the name of the - cooperative. (`#86 `_) -- Ensure that the company_type value of a subscription request is copied to the - legal_form field of the created partner. (`#86 `_) -- Add unique per-company constraints on the cooperator register number and the - operation register number. (`#86 `_) -- Fix copyright statements: add missing ones and use the same format everywhere. (`#86 `_) -- Fix consistency of XML files: XML declaration, spacing. (`#86 `_) -- Display an error message instead of failing when trying to create a - subscription request from a partner and no default share product is found. (`#86 `_) -- Rename internal string value of "Blocked" subscription request state from - ``block`` to ``blocked``. (`#86 `_) -- Ensure per-company sequences are used (for the cooperator register number and - the operation register number). (`#86 `_) -- Prevent to create a subscription request where Email and Company Email have - the same value, to avoid trying to create a recursive partner hierarchy when - validating the subscription request (the partner being the parent of itself). (`#86 `_) -- Fix the footer layout to add company logos: wrap the original layout instead - of overwriting it. (`#86 `_) -- Fix required company fields on subscription request form. (`#86 `_) - - -**Deprecations and Removals** - -- Remove the extra columns in the contacts list view; they can now be found in - the cooperator register. (`#86 `_) -- Remove deprecated ``subscription.request.create_comp_sub_req()``. Use - the normal ``subscription.request.create()`` instead. (`#86 `_) -- Remove the useless "subscription" operation request type. (`#86 `_) - - -14.0.2.0.0 (2023-07-25) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Each company now has their own mail templates for cooperator-related e-mails. If - no template is set, the default (global) template is used. (`#73 `_) -- ir.sequences used by this module are no longer global; each company has its own - sequence for cooperator memberships. (`#74 `_) -- Create subscription journal per company. (`#75 `_) -- Improve multi-company consistency by setting ``company_id`` on records where - needed and adding the ``check_company`` flag on ``Many2one`` fields. (`#77 `_) -- ir.rules for multi-company usage added. Users cannot access records of this - module if they are not members of the relevant company. (`#78 `_) -- Move cooperative membership properties from ``res.partner`` to new - ``cooperative.membership`` model and add company-dependent computed fields on - ``res.partner`` for backward compatibility. (`#82 `_) - - -14.0.1.6.0 (2023-02-23) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Features** - -- Removed all selection widgets. (`#55 `_) - - -12.0.5.3.0 (2022-09-05) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Improved Documentation** - -- Adding USAGE.rst to inform that localization modules are necessary. (`#346 `_) - - -12.0.5.0.0 (2022-06-23) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Deprecations and Removals** - -- When no cooperator account is defined on the company, this module previously - defaulted to the account with code '416000'. This behaviour has been removed - because the code is Belgian-only. The functionality has been moved to - ``l10n_be_cooperator``. (`#314 `_) - - -12.0.3.3.2 (2022-06-20) -~~~~~~~~~~~~~~~~~~~~~~~ - -**Bugfixes** - -- Fix name computation crash (`#330 `_) diff --git a/cooperator/readme/ROADMAP.md b/cooperator/readme/ROADMAP.md new file mode 100644 index 000000000..493defcca --- /dev/null +++ b/cooperator/readme/ROADMAP.md @@ -0,0 +1,25 @@ +Gather and consolidate all cooperator settings in the application +parameters. + +Consider a refactoring for: + +1. removing a potential redundancy between the boolean field + "representative" and the address type "representative". +2. prevent new contacts to have the representative address type, if + they are not representative. + +See [this +issue](https://github.com/coopiteasy/vertical-cooperative/issues/350). + +Known caveat: the cooperator localization modules will have to be split +in order to install the `cooperator` module without the +`cooperator_website` module. + +A “Cooperative Memberships” page should be added to the `res.partner` +form, displaying all the cooperative memberships of the partner +(`cooperative_membership_ids`). The page should only be visible for +users that are both in the `cooperator_group_user` group and in the +`base.group_multi_company` group (how to do this?). Should it display +the memberships of all companies or only the ones in which the user is +“logged in” (checked in the menu)? If all companies, there would be a +conflict with the `cooperative_membership_rule_company` `ir.rule`. diff --git a/cooperator/readme/ROADMAP.rst b/cooperator/readme/ROADMAP.rst deleted file mode 100644 index 61216ba67..000000000 --- a/cooperator/readme/ROADMAP.rst +++ /dev/null @@ -1,23 +0,0 @@ -Gather and consolidate all cooperator settings in the application parameters. - -Consider a refactoring for: - -#. removing a potential redundancy between the boolean field "representative" - and the address type "representative". -#. prevent new contacts to have the representative address type, if they are - not representative. - -See `this issue `_. - -Known caveat: the cooperator localization modules will have to be split in -order to install the ``cooperator`` module without the ``cooperator_website`` -module. - -A “Cooperative Memberships” page should be added to the ``res.partner`` form, -displaying all the cooperative memberships of the partner -(``cooperative_membership_ids``). The page should only be visible for users -that are both in the ``cooperator_group_user`` group and in the -``base.group_multi_company`` group (how to do this?). Should it display the -memberships of all companies or only the ones in which the user is “logged in” -(checked in the menu)? If all companies, there would be a conflict with the -``cooperative_membership_rule_company`` ``ir.rule``. diff --git a/cooperator/readme/USAGE.md b/cooperator/readme/USAGE.md new file mode 100644 index 000000000..ea102aa36 --- /dev/null +++ b/cooperator/readme/USAGE.md @@ -0,0 +1,5 @@ +See the +[documentation](https://doc.it4socialeconomy.org/books/application-cooperators) +(not available in english ATM). + +A localization module is needed with this module. diff --git a/cooperator/readme/USAGE.rst b/cooperator/readme/USAGE.rst deleted file mode 100644 index f186c1e88..000000000 --- a/cooperator/readme/USAGE.rst +++ /dev/null @@ -1,3 +0,0 @@ -See the `documentation `_ (not available in english ATM). - -A localization module is needed with this module. diff --git a/cooperator/static/description/index.html b/cooperator/static/description/index.html index 8da67eeaa..2c09b3e45 100644 --- a/cooperator/static/description/index.html +++ b/cooperator/static/description/index.html @@ -367,15 +367,15 @@

Cooperators

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:fc9abf44c53ec9ed50ac717e7fa26489ddc8765fd713c8db92f40bc077d5b1ce +!! source digest: sha256:bcd0cdca7fa63893786aa9d7e18370edd1cb1c9c08dfaa7765559ad3c3402609 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/cooperative Translate me on Weblate Try me on Runboat

+

Beta AGPL-3

Manage cooperators of a cooperative.

A basic flow can be the following:

  • Create subscription request for a person (moral or physical)
  • -
  • Validate subscription request, a capital release request (an invoice: account.move). -This invoice is sent to the future cooperator.
  • +
  • Validate subscription request, a capital release request (an invoice: +account.move). This invoice is sent to the future cooperator.
  • Payment of the cooperator is registered and the capital Release request is marked as paid.
  • A new cooperator (a special partner) is created, and the right type @@ -397,7 +397,8 @@

    Cooperators

Configurations:

    -
  • on the company, set a default payment term for the capital release requests.
  • +
  • on the company, set a default payment term for the capital release +requests.
  • on the company, set the cooperator account.

Table of contents

@@ -415,42 +416,45 @@

Cooperators

  • 12.0.3.3.2 (2022-06-20)
  • -
  • Bug Tracker
  • -
  • Credits

    Usage

    -

    See the documentation (not available in english ATM).

    +

    See the +documentation +(not available in english ATM).

    A localization module is needed with this module.

    Known issues / Roadmap

    -

    Gather and consolidate all cooperator settings in the application parameters.

    +

    Gather and consolidate all cooperator settings in the application +parameters.

    Consider a refactoring for:

      -
    1. removing a potential redundancy between the boolean field “representative” -and the address type “representative”.
    2. -
    3. prevent new contacts to have the representative address type, if they are -not representative.
    4. +
    5. removing a potential redundancy between the boolean field +“representative” and the address type “representative”.
    6. +
    7. prevent new contacts to have the representative address type, if they +are not representative.
    -

    See this issue.

    -

    Known caveat: the cooperator localization modules will have to be split in -order to install the cooperator module without the cooperator_website -module.

    -

    A “Cooperative Memberships” page should be added to the res.partner form, -displaying all the cooperative memberships of the partner -(cooperative_membership_ids). The page should only be visible for users -that are both in the cooperator_group_user group and in the -base.group_multi_company group (how to do this?). Should it display the -memberships of all companies or only the ones in which the user is “logged in” -(checked in the menu)? If all companies, there would be a conflict with the -cooperative_membership_rule_company ir.rule.

    +

    See this +issue.

    +

    Known caveat: the cooperator localization modules will have to be split +in order to install the cooperator module without the +cooperator_website module.

    +

    A “Cooperative Memberships” page should be added to the res.partner +form, displaying all the cooperative memberships of the partner +(cooperative_membership_ids). The page should only be visible for +users that are both in the cooperator_group_user group and in the +base.group_multi_company group (how to do this?). Should it display +the memberships of all companies or only the ones in which the user is +“logged in” (checked in the menu)? If all companies, there would be a +conflict with the cooperative_membership_rule_company ir.rule.

    Changelog

    @@ -458,147 +462,183 @@

    Changelog

    16.0.1.0.2 (2024-03-12)

    Bugfixes

      -
    • Remove duplicated member field in res.partner form view. (#47)
    • +
    • Remove duplicated member field in res.partner form view. +(#47)

    16.0.1.0.0 (2023-11-29)

    Features

      -
    • Add a “Share Type” column to the cooperator register report. (#86)
    • -
    • Add a new “Registers” menu entry and move the “Subscription Register” menu -entry there. (#86)
    • -
    • Use default filters instead of domains in contact views. (#86)
    • -
    • Merge the confirmation email template for individuals and companies into one. (#86)
    • -
    • Rename some files and XML IDs to improve consistency. (#86)
    • -
    • Update email templates to the default Odoo layout (what also makes them -shorter). (#86)
    • -
    • Add a description to email templates. (#86)
    • -
    • Move the “Cooperator Candidates” menu entry to the “Cooperators” menu. (#86)
    • +
    • Add a “Share Type” column to the cooperator register report. +(#86)
    • +
    • Add a new “Registers” menu entry and move the “Subscription Register” +menu entry there. +(#86)
    • +
    • Use default filters instead of domains in contact views. +(#86)
    • +
    • Merge the confirmation email template for individuals and companies +into one. (#86)
    • +
    • Rename some files and XML IDs to improve consistency. +(#86)
    • +
    • Update email templates to the default Odoo layout (what also makes +them shorter). +(#86)
    • +
    • Add a description to email templates. +(#86)
    • +
    • Move the “Cooperator Candidates” menu entry to the “Cooperators” menu. +(#86)
    • Add a new “Cooperator Register” view (and menu entry) to display the -cooperative memberships and allow to print the cooperator register (report -that was previously on the partner model). (#86)
    • -
    • Make the capital release request report inherit from the invoice report -instead of copying and modifying it. (#86)
    • +cooperative memberships and allow to print the cooperator register +(report that was previously on the partner model). +(#86) +
    • Make the capital release request report inherit from the invoice +report instead of copying and modifying it. +(#86)

    Bugfixes

    • Ensure that only shares related to the current company appear on the -cooperator certificate. (#86)
    • -
    • Ensure reversals of capital release requests use a name prefix to not clash -with normal entries (“RSUBJ” instead of “SUBJ”). (#86)
    • -
    • Fix subscription requests created by transfer operations: ensure that no -confirmation email is sent, that they don’t appear in the list of subscription -requests and cannot be erroneously validated. (#86)
    • -
    • Fix the display of the first name in email templates and add tests to cover -this. (#86)
    • -
    • Fix error when creating a new partner from the normal partner form. (#86)
    • -
    • Fix the layout of all reports by rewriting them from the default invoice -layout. (#86)
    • -
    • Ensure creating a cooperator for a non-current company works (when a capital -release request is paid). (#86)
    • -
    • Ensure that share.line.share_number cannot be negative. (#86)
    • -
    • Don’t send a cooperator certificate if there are no remaining shares after an -operation. (#86)
    • -
    • Fix the company name in confirmation email template: display the name of the -company that made the subscription request instead of the name of the -cooperative. (#86)
    • -
    • Ensure that the company_type value of a subscription request is copied to the -legal_form field of the created partner. (#86)
    • -
    • Add unique per-company constraints on the cooperator register number and the -operation register number. (#86)
    • -
    • Fix copyright statements: add missing ones and use the same format everywhere. (#86)
    • -
    • Fix consistency of XML files: XML declaration, spacing. (#86)
    • +cooperator certificate. +(#86) +
    • Ensure reversals of capital release requests use a name prefix to not +clash with normal entries (“RSUBJ” instead of “SUBJ”). +(#86)
    • +
    • Fix subscription requests created by transfer operations: ensure that +no confirmation email is sent, that they don’t appear in the list of +subscription requests and cannot be erroneously validated. +(#86)
    • +
    • Fix the display of the first name in email templates and add tests to +cover this. (#86)
    • +
    • Fix error when creating a new partner from the normal partner form. +(#86)
    • +
    • Fix the layout of all reports by rewriting them from the default +invoice layout. +(#86)
    • +
    • Ensure creating a cooperator for a non-current company works (when a +capital release request is paid). +(#86)
    • +
    • Ensure that share.line.share_number cannot be negative. +(#86)
    • +
    • Don’t send a cooperator certificate if there are no remaining shares +after an operation. +(#86)
    • +
    • Fix the company name in confirmation email template: display the name +of the company that made the subscription request instead of the name +of the cooperative. +(#86)
    • +
    • Ensure that the company_type value of a subscription request is copied +to the legal_form field of the created partner. +(#86)
    • +
    • Add unique per-company constraints on the cooperator register number +and the operation register number. +(#86)
    • +
    • Fix copyright statements: add missing ones and use the same format +everywhere. (#86)
    • +
    • Fix consistency of XML files: XML declaration, spacing. +(#86)
    • Display an error message instead of failing when trying to create a -subscription request from a partner and no default share product is found. (#86)
    • -
    • Rename internal string value of “Blocked” subscription request state from -block to blocked. (#86)
    • -
    • Ensure per-company sequences are used (for the cooperator register number and -the operation register number). (#86)
    • -
    • Prevent to create a subscription request where Email and Company Email have -the same value, to avoid trying to create a recursive partner hierarchy when -validating the subscription request (the partner being the parent of itself). (#86)
    • -
    • Fix the footer layout to add company logos: wrap the original layout instead -of overwriting it. (#86)
    • -
    • Fix required company fields on subscription request form. (#86)
    • +subscription request from a partner and no default share product is +found. (#86) +
    • Rename internal string value of “Blocked” subscription request state +from block to blocked. +(#86)
    • +
    • Ensure per-company sequences are used (for the cooperator register +number and the operation register number). +(#86)
    • +
    • Prevent to create a subscription request where Email and Company Email +have the same value, to avoid trying to create a recursive partner +hierarchy when validating the subscription request (the partner being +the parent of itself). +(#86)
    • +
    • Fix the footer layout to add company logos: wrap the original layout +instead of overwriting it. +(#86)
    • +
    • Fix required company fields on subscription request form. +(#86)

    Deprecations and Removals

      -
    • Remove the extra columns in the contacts list view; they can now be found in -the cooperator register. (#86)
    • +
    • Remove the extra columns in the contacts list view; they can now be +found in the cooperator register. +(#86)
    • Remove deprecated subscription.request.create_comp_sub_req(). Use -the normal subscription.request.create() instead. (#86)
    • -
    • Remove the useless “subscription” operation request type. (#86)
    • +the normal subscription.request.create() instead. +(#86) +
    • Remove the useless “subscription” operation request type. +(#86)

    14.0.2.0.0 (2023-07-25)

    Features

      -
    • Each company now has their own mail templates for cooperator-related e-mails. If -no template is set, the default (global) template is used. (#73)
    • -
    • ir.sequences used by this module are no longer global; each company has its own -sequence for cooperator memberships. (#74)
    • -
    • Create subscription journal per company. (#75)
    • -
    • Improve multi-company consistency by setting company_id on records where -needed and adding the check_company flag on Many2one fields. (#77)
    • -
    • ir.rules for multi-company usage added. Users cannot access records of this -module if they are not members of the relevant company. (#78)
    • +
    • Each company now has their own mail templates for cooperator-related +e-mails. If no template is set, the default (global) template is used. +(#73)
    • +
    • ir.sequences used by this module are no longer global; each company +has its own sequence for cooperator memberships. +(#74)
    • +
    • Create subscription journal per company. +(#75)
    • +
    • Improve multi-company consistency by setting company_id on records +where needed and adding the check_company flag on Many2one +fields. (#77)
    • +
    • ir.rules for multi-company usage added. Users cannot access records of +this module if they are not members of the relevant company. +(#78)
    • Move cooperative membership properties from res.partner to new -cooperative.membership model and add company-dependent computed fields on -res.partner for backward compatibility. (#82)
    • +cooperative.membership model and add company-dependent computed +fields on res.partner for backward compatibility. +(#82)

    14.0.1.6.0 (2023-02-23)

    Features

      -
    • Removed all selection widgets. (#55)
    • +
    • Removed all selection widgets. +(#55)

    12.0.5.3.0 (2022-09-05)

    Improved Documentation

      -
    • Adding USAGE.rst to inform that localization modules are necessary. (#346)
    • +
    • Adding USAGE.rst to inform that localization modules are necessary. +(#346)

    12.0.5.0.0 (2022-06-23)

    Deprecations and Removals

      -
    • When no cooperator account is defined on the company, this module previously -defaulted to the account with code ‘416000’. This behaviour has been removed -because the code is Belgian-only. The functionality has been moved to -l10n_be_cooperator. (#314)
    • +
    • When no cooperator account is defined on the company, this module +previously defaulted to the account with code ‘416000’. This behaviour +has been removed because the code is Belgian-only. The functionality +has been moved to l10n_be_cooperator. +(#314)

    12.0.3.3.2 (2022-06-20)

    Bugfixes

      -
    • Fix name computation crash (#330)
    • +
    • Fix name computation crash +(#330)
    -
    -

    Bug Tracker

    -

    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 to smash it by providing a detailed and welcomed -feedback.

    -

    Do not contact contributors directly about support or help with technical issues.

    -
    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Coop IT Easy SC
    -

    Contributors

    +

    Contributors

    • Coop IT Easy SC:
      • Houssine Bakkali
      • @@ -611,19 +651,17 @@

        Contributors

      • hugues de keyzer
    • +
    • ‘Som IT Cooperatiu SCCL’
        +
      • Nicolás Ramos
      • +
      +
    -

    Maintainers

    -

    This module is maintained by the OCA.

    - -Odoo Community Association - -

    OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use.

    -

    This module is part of the OCA/cooperative project on GitHub.

    -

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    +

    Maintainers

    +

    This module is maintained by Som IT Cooperatiu SCCL.

    +

    Contact the maintainer through their official support channels in case you find +any issues with this module.

    diff --git a/cooperator/tests/test_cooperator.py b/cooperator/tests/test_cooperator.py index a628a3b3f..943393303 100644 --- a/cooperator/tests/test_cooperator.py +++ b/cooperator/tests/test_cooperator.py @@ -743,7 +743,6 @@ def test_create_cooperator_and_user_for_multiple_companies(self): self.validate_subscription_request_and_pay(subscription_request_2) partner_2 = subscription_request_2.partner_id self.assertEqual(partner_1, partner_2) - user = self.env["res.users"].search([("partner_id", "=", partner_1.id)]) self.assertEqual(user.company_id, self.company) self.assertEqual(user.company_ids, self.company | company_2) @@ -1584,3 +1583,43 @@ def test_create_user_multiple_users(self): self.assertEqual(inactive_user.company_ids, self.env.company) self.assertEqual(inactive_user.company_id, self.env.company) self.assertTrue(inactive_user.active) + + def test_capital_release_request_income_account_new(self): + """ + Test that the income account of capital release requests for new subscriptions + uses the standard income account. + """ + self.subscription_request_1.validate_subscription_request() + invoice = self.subscription_request_1.capital_release_request + income_line = invoice.invoice_line_ids.filtered(lambda l: l.credit == 0) + self.assertEqual( + income_line.account_id, + self.share_y.property_account_income_id + or self.share_y.categ_id.property_account_income_categ_id, + ) + + def test_capital_release_request_income_account_increase(self): + """ + Test that the income account of capital release requests for increase subscriptions + uses the increase income account. + """ + self.subscription_request_1.validate_subscription_request() + self.pay_invoice(self.subscription_request_1.capital_release_request) + + subscription_request_2 = self.create_dummy_subscription_from_partner( + self.subscription_request_1.partner_id + ) + + increase_account = self.env["account.account"].create( + { + "name": "Test Increase Income Account", + "code": "TINC", + "account_type": "income", + } + ) + + self.share_y.property_account_income_increase_id = increase_account.id + subscription_request_2.validate_subscription_request() + invoice = subscription_request_2.capital_release_request + income_line = invoice.invoice_line_ids.filtered(lambda l: l.credit == 0) + self.assertEqual(income_line.account_id, increase_account) diff --git a/cooperator/views/product_category_view.xml b/cooperator/views/product_category_view.xml new file mode 100644 index 000000000..a3ab59af4 --- /dev/null +++ b/cooperator/views/product_category_view.xml @@ -0,0 +1,19 @@ + + + + product.category.form.account.inherit + product.category + + + + + + + + diff --git a/cooperator/views/product_view.xml b/cooperator/views/product_view.xml index deed1a3cd..46577a64f 100644 --- a/cooperator/views/product_view.xml +++ b/cooperator/views/product_view.xml @@ -6,7 +6,6 @@ SPDX-FileCopyrightText: 2018 Coop IT Easy SC SPDX-License-Identifier: AGPL-3.0-or-later --> - product_template_form_view product.template @@ -30,6 +29,12 @@ SPDX-License-Identifier: AGPL-3.0-or-later - product_template_search_view product.template @@ -70,7 +74,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later - product.template.product.form product.template @@ -83,14 +86,15 @@ SPDX-License-Identifier: AGPL-3.0-or-later - Share type ir.actions.act_window product.template kanban,tree,form - - + + + + [('is_share','=',True)] - - - Product ir.actions.act_window product.product tree,form,kanban - + + [('is_share','=',False)]

    @@ -129,7 +131,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later

    - Products ir.actions.act_window @@ -154,7 +155,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later

    - -