diff --git a/l10n_ch_cooperator/README.rst b/l10n_ch_cooperator/README.rst new file mode 100644 index 000000000..77fc16cc8 --- /dev/null +++ b/l10n_ch_cooperator/README.rst @@ -0,0 +1,81 @@ +======================= +Cooperators Switzerland +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8f89b275b2598f9a6b2875d4591289503d8ab27479ba048fdbc05990f118c0a7 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.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/l10n_ch_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-l10n_ch_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| + +This is the Swiss localization for the Cooperators module + +Features: + +- Add Swiss legal form of companies on partner and on Subscription Request + +**Table of contents** + +.. contents:: + :local: + +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 +======= + +Authors +~~~~~~~ + +* Coop IT Easy SC + +Contributors +~~~~~~~~~~~~ + +* Coop IT Easy SC +* Houssine BAKKALI + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. diff --git a/l10n_ch_cooperator/__init__.py b/l10n_ch_cooperator/__init__.py new file mode 100644 index 000000000..c4420967c --- /dev/null +++ b/l10n_ch_cooperator/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2018 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import models diff --git a/l10n_ch_cooperator/__manifest__.py b/l10n_ch_cooperator/__manifest__.py new file mode 100644 index 000000000..0c3ea51df --- /dev/null +++ b/l10n_ch_cooperator/__manifest__.py @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2013-2018 Open Architects Consulting SPRL +# SPDX-FileCopyrightText: 2018 Coop IT Easy SC +# SPDX-FileContributor: Houssine BAKKALI +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +{ + "name": "Cooperators Switzerland", + "summary": "Cooperators Switzerland localization", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["cooperator", "cooperator_website", "l10n_ch"], + "author": "Coop IT Easy SC, Odoo Community Association (OCA)", + "category": "Cooperative management", + "website": "https://github.com/OCA/cooperative", + "data": [ + "views/subscription_template.xml", + ], + "auto-install": True, +} diff --git a/l10n_ch_cooperator/i18n/l10n_ch_cooperator.pot b/l10n_ch_cooperator/i18n/l10n_ch_cooperator.pot new file mode 100644 index 000000000..07e6c4e07 --- /dev/null +++ b/l10n_ch_cooperator/i18n/l10n_ch_cooperator.pot @@ -0,0 +1,118 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_cooperator +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "ASBL" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Association" +msgstr "" + +#. module: l10n_ch_cooperator +#: model_terms:ir.ui.view,arch_db:l10n_ch_cooperator.iban_template_ch +msgid "Bank Account Number" +msgstr "" + +#. module: l10n_ch_cooperator +#: model_terms:ir.ui.view,arch_db:l10n_ch_cooperator.iban_template_ch +msgid "CH48523080767127" +msgstr "" + +#. module: l10n_ch_cooperator +#: model:ir.model.fields,field_description:l10n_ch_cooperator.field_subscription_request__company_type +msgid "Company type" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Company under public law" +msgstr "" + +#. module: l10n_ch_cooperator +#: model:ir.model,name:l10n_ch_cooperator.model_res_partner +msgid "Contact" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Cooperative" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "EURL / Entreprise individuelle" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Foundation" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Individual company" +msgstr "" + +#. module: l10n_ch_cooperator +#: model:ir.model.fields,field_description:l10n_ch_cooperator.field_res_partner__legal_form +#: model:ir.model.fields,field_description:l10n_ch_cooperator.field_res_users__legal_form +msgid "Legal form" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "Partnership" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "SA / SAS" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "SARL" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "SCRL" +msgstr "" + +#. module: l10n_ch_cooperator +#: selection:res.partner,legal_form:0 +#: selection:subscription.request,company_type:0 +msgid "SPRL" +msgstr "" + +#. module: l10n_ch_cooperator +#: model:ir.model,name:l10n_ch_cooperator.model_subscription_request +msgid "Subscription Request" +msgstr "" + diff --git a/l10n_ch_cooperator/models/__init__.py b/l10n_ch_cooperator/models/__init__.py new file mode 100644 index 000000000..3241f7822 --- /dev/null +++ b/l10n_ch_cooperator/models/__init__.py @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2018 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import res_partner +from . import subscription_request diff --git a/l10n_ch_cooperator/models/res_partner.py b/l10n_ch_cooperator/models/res_partner.py new file mode 100644 index 000000000..c7488b297 --- /dev/null +++ b/l10n_ch_cooperator/models/res_partner.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2019 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +def get_company_type_selection(): + return [ + ("ei", "Individual company"), + ("snc", "Partnership"), + ("sa", "Limited company (SA)"), + ("sarl", "Limited liability company (Ltd)"), + ("sc", "Cooperative"), + ("asso", "Association"), + ("fond", "Foundation"), + ("edp", "Company under public law"), + ] + + +class ResPartner(models.Model): + _inherit = "res.partner" + + legal_form = fields.Selection(selection_add=get_company_type_selection()) diff --git a/l10n_ch_cooperator/models/subscription_request.py b/l10n_ch_cooperator/models/subscription_request.py new file mode 100644 index 000000000..c4f26cf86 --- /dev/null +++ b/l10n_ch_cooperator/models/subscription_request.py @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2018 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + +from . import res_partner + + +class SubscriptionRequest(models.Model): + _inherit = "subscription.request" + + company_type = fields.Selection( + selection_add=res_partner.get_company_type_selection() + ) + + def get_required_field(self): + req_fields = super(SubscriptionRequest, self).get_required_field() + if "iban" in req_fields: + req_fields.remove("iban") + + return req_fields + + def check_iban(self, iban): + if iban: + return super(SubscriptionRequest, self).check_iban(iban) + return True diff --git a/l10n_ch_cooperator/readme/CONTRIBUTORS.rst b/l10n_ch_cooperator/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..5a4cc01eb --- /dev/null +++ b/l10n_ch_cooperator/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Coop IT Easy SC +* Houssine BAKKALI diff --git a/l10n_ch_cooperator/readme/DESCRIPTION.rst b/l10n_ch_cooperator/readme/DESCRIPTION.rst new file mode 100644 index 000000000..cd06251b8 --- /dev/null +++ b/l10n_ch_cooperator/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This is the Swiss localization for the Cooperators module + +Features: + +- Add Swiss legal form of companies on partner and on Subscription Request diff --git a/l10n_ch_cooperator/static/description/index.html b/l10n_ch_cooperator/static/description/index.html new file mode 100644 index 000000000..52ff9764f --- /dev/null +++ b/l10n_ch_cooperator/static/description/index.html @@ -0,0 +1,428 @@ + + + + + +Cooperators Switzerland + + + +
+

Cooperators Switzerland

+ + +

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

+

This is the Swiss localization for the Cooperators module

+

Features:

+
    +
  • Add Swiss legal form of companies on partner and on Subscription Request
  • +
+

Table of contents

+ +
+

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

+
+

Authors

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Contributors

+ +
+
+

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.

+
+
+
+ + diff --git a/l10n_ch_cooperator/views/subscription_template.xml b/l10n_ch_cooperator/views/subscription_template.xml new file mode 100644 index 000000000..9e336f948 --- /dev/null +++ b/l10n_ch_cooperator/views/subscription_template.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/setup/l10n_ch_cooperator/odoo/addons/l10n_ch_cooperator b/setup/l10n_ch_cooperator/odoo/addons/l10n_ch_cooperator new file mode 120000 index 000000000..ec0ebaf95 --- /dev/null +++ b/setup/l10n_ch_cooperator/odoo/addons/l10n_ch_cooperator @@ -0,0 +1 @@ +../../../../l10n_ch_cooperator \ No newline at end of file diff --git a/setup/l10n_ch_cooperator/setup.py b/setup/l10n_ch_cooperator/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/l10n_ch_cooperator/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)