diff --git a/l10n_be_cooperator_portal/README.rst b/l10n_be_cooperator_portal/README.rst deleted file mode 100644 index 71df1927a..000000000 --- a/l10n_be_cooperator_portal/README.rst +++ /dev/null @@ -1,60 +0,0 @@ -============================= -Tax Shelter reports in Portal -============================= - -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |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-coopiteasy%2Fvertical--cooperative-lightgray.png?logo=github - :target: https://github.com/coopiteasy/vertical-cooperative/tree/14.0/l10n_be_cooperator_portal - :alt: coopiteasy/vertical-cooperative - -|badge1| |badge2| |badge3| - -Give access to Tax Shelter Report in the website portal. - -**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 smashing 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 `_: - - * Rémy TAYMANS - * Vincent VAN ROSSEM - -Maintainers -~~~~~~~~~~~ - -This module is part of the `coopiteasy/vertical-cooperative `_ project on GitHub. - -You are welcome to contribute. diff --git a/l10n_be_cooperator_portal/__init__.py b/l10n_be_cooperator_portal/__init__.py deleted file mode 100644 index e046e49fb..000000000 --- a/l10n_be_cooperator_portal/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import controllers diff --git a/l10n_be_cooperator_portal/__manifest__.py b/l10n_be_cooperator_portal/__manifest__.py deleted file mode 100644 index ac2bca30d..000000000 --- a/l10n_be_cooperator_portal/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2018-Coop IT Easy SC () -# - Rémy Taymans -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -{ - "name": "Tax Shelter reports in Portal", - "version": "14.0.1.0.0", - "depends": [ - "portal", - "l10n_be_cooperator", - ], - "summary": "Give access to Tax Shelter Report in the portal.", - "author": "Coop IT Easy SC", - "license": "AGPL-3", - "category": "Cooperative Management", - "website": "https://coopiteasy.be", - "data": ["views/portal_templates.xml"], - "installable": True, -} diff --git a/l10n_be_cooperator_portal/controllers/__init__.py b/l10n_be_cooperator_portal/controllers/__init__.py deleted file mode 100644 index 12a7e529b..000000000 --- a/l10n_be_cooperator_portal/controllers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import main diff --git a/l10n_be_cooperator_portal/controllers/main.py b/l10n_be_cooperator_portal/controllers/main.py deleted file mode 100644 index 66bd0f0a4..000000000 --- a/l10n_be_cooperator_portal/controllers/main.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 2017-2018 Coop IT Easy SC -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - - -from werkzeug.exceptions import Forbidden - -from odoo import http -from odoo.exceptions import AccessError, MissingError -from odoo.http import request - -from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager - - -class PortalTaxShelter(CustomerPortal): - def _prepare_portal_layout_values(self): - values = super()._prepare_portal_layout_values() - partner = request.env.user.partner_id - tax_shelter_count = ( - request.env["tax.shelter.certificate"] - .sudo() - .search_count([("partner_id", "in", [partner.commercial_partner_id.id])]) - ) - values["tax_shelter_count"] = tax_shelter_count - return values - - def _taxshelter_certificate_get_page_view_values( - self, taxshelter_certificate, access_token, **kwargs - ): - values = { - "company_id": request.env.company, - "page_name": "taxshelter", - "taxshelter": taxshelter_certificate, - } - return self._get_page_view_values( - taxshelter_certificate, - access_token, - values, - "my_taxshelter_certificates_history", - False, - **kwargs, - ) - - @http.route( - [ - "/my/tax_shelter_certificates", - "/my/tax_shelter_certificates/page/", - ], - type="http", - auth="user", - website=True, - ) - def portal_my_tax_shelter_certificates( - self, page=1, date_begin=None, date_end=None, **kw - ): - """Render a page that lits the tax shelter report: - * Tax Shelter Certificates - * Shares Certifcates - """ - values = self._prepare_portal_layout_values() - TaxShelterCertificate = request.env["tax.shelter.certificate"] - partner = request.env.user.partner_id - domain = [("partner_id", "in", [partner.commercial_partner_id.id])] - - if date_begin and date_end: - domain += [ - ("create_date", ">=", date_begin), - ("create_date", "<", date_end), - ] - - # count for pager - tax_shelter_count = TaxShelterCertificate.sudo().search_count(domain) - # pager - pager = portal_pager( - url="/my/tax_shelter_certificates", - url_args={"date_begin": date_begin, "date_end": date_end}, - total=tax_shelter_count, - page=page, - step=self._items_per_page, - ) - # content according to pager and archive selected - tax_shelters = TaxShelterCertificate.sudo().search( - domain, limit=self._items_per_page, offset=pager["offset"] - ) - tax_shelters = tax_shelters.sorted( - key=lambda r: r.declaration_id.fiscal_year, reverse=True - ) - request.session["my_taxshelter_certificates_history"] = tax_shelters.ids[:100] - - values.update( - { - "company_id": request.env.company, - "date": date_begin, - "tax_shelters": tax_shelters, - "page_name": "taxshelter", - "pager": pager, - "default_url": "/my/tax_shelter_certificates", - } - ) - return request.render("l10n_be_cooperator_portal.portal_my_tax_shelter", values) - - # Black adds a trailing comma after last argument of function definition - # this syntax is invalid for python < 3.6 - # Exclude for formatting while not fixed, follow status here: - # https://github.com/psf/black/issues/1657 - # fmt: off - @http.route( - ["/my/tax_shelter_certificates/"], - type="http", - auth="public", - website=True, - ) - def portal_taxshelter_certificate( - self, - certificate_id, - access_token=None, - report_type=None, - download=False, - query_string=None, - **kw - ): - # fmt: on - partner = request.env.user.partner_id - try: - taxshelter_certificate_sudo = self._document_check_access( - "tax.shelter.certificate", certificate_id, access_token - ) - if taxshelter_certificate_sudo.partner_id != partner: - raise Forbidden() - except (AccessError, MissingError): - return request.redirect("/my") - - if report_type in ("html", "pdf", "text") and query_string in ( - "subscription", - "shares", - ): - report_ref = ( - "l10n_be_cooperator.action_tax_shelter_%s_report" - % (query_string) - ) - return self._show_report( - model=taxshelter_certificate_sudo, - report_type=report_type, - report_ref=report_ref, - download=download, - ) - - values = self._taxshelter_certificate_get_page_view_values( - taxshelter_certificate_sudo, access_token, **kw - ) - return request.render( - "l10n_be_cooperator_portal.portal_taxshelter_page", values - ) diff --git a/l10n_be_cooperator_portal/i18n/fr_BE.po b/l10n_be_cooperator_portal/i18n/fr_BE.po deleted file mode 100644 index 49c1f6d89..000000000 --- a/l10n_be_cooperator_portal/i18n/fr_BE.po +++ /dev/null @@ -1,62 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_be_cooperator_portal -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: fr_BE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid " Shares Certificate" -msgstr " Attestation de parts" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid " Subscription Certificate" -msgstr " Certificat de souscription" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Declaration Year" -msgstr "Année de déclaration" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Draft Tax Shelter Certificate" -msgstr "Certificats Tax shelter brouillon" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid "Print Shares" -msgstr "Imprimer attestation de parts" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid "Print Subscription" -msgstr "Imprimer certificat de souscription" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_home_menu_tax_shelter -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_home_tax_shelter -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Tax Shelter Certificates" -msgstr "Certificats Tax shelter" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "There are currently no tax shelter certificates for your account." -msgstr "Il n'y a actuellement aucun certificat Tax shelter pour votre compte." - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Total Amount" -msgstr "Montant total" diff --git a/l10n_be_cooperator_portal/i18n/l10n_be_cooperator_portal.pot b/l10n_be_cooperator_portal/i18n/l10n_be_cooperator_portal.pot deleted file mode 100644 index 6d2804ae9..000000000 --- a/l10n_be_cooperator_portal/i18n/l10n_be_cooperator_portal.pot +++ /dev/null @@ -1,61 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_be_cooperator_portal -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.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_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid " Shares Certificate" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid " Subscription Certificate" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Declaration Year" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Draft Tax Shelter Certificate" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid "Print Shares" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_taxshelter_page -msgid "Print Subscription" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_home_menu_tax_shelter -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_home_tax_shelter -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Tax Shelter Certificates" -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "There are currently no tax shelter certificates for your account." -msgstr "" - -#. module: l10n_be_cooperator_portal -#: model_terms:ir.ui.view,arch_db:l10n_be_cooperator_portal.portal_my_tax_shelter -msgid "Total Amount" -msgstr "" diff --git a/l10n_be_cooperator_portal/readme/CONTRIBUTORS.rst b/l10n_be_cooperator_portal/readme/CONTRIBUTORS.rst deleted file mode 100644 index 1c6df33e7..000000000 --- a/l10n_be_cooperator_portal/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,4 +0,0 @@ -* `Coop IT Easy SC `_: - - * Rémy TAYMANS - * Vincent VAN ROSSEM diff --git a/l10n_be_cooperator_portal/readme/DESCRIPTION.rst b/l10n_be_cooperator_portal/readme/DESCRIPTION.rst deleted file mode 100644 index 570ae5084..000000000 --- a/l10n_be_cooperator_portal/readme/DESCRIPTION.rst +++ /dev/null @@ -1 +0,0 @@ -Give access to Tax Shelter Report in the website portal. diff --git a/l10n_be_cooperator_portal/views/portal_templates.xml b/l10n_be_cooperator_portal/views/portal_templates.xml deleted file mode 100644 index 360502bca..000000000 --- a/l10n_be_cooperator_portal/views/portal_templates.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/setup/l10n_be_cooperator_portal/odoo/addons/l10n_be_cooperator_portal b/setup/l10n_be_cooperator_portal/odoo/addons/l10n_be_cooperator_portal deleted file mode 120000 index 1425390a8..000000000 --- a/setup/l10n_be_cooperator_portal/odoo/addons/l10n_be_cooperator_portal +++ /dev/null @@ -1 +0,0 @@ -../../../../l10n_be_cooperator_portal \ No newline at end of file diff --git a/setup/l10n_be_cooperator_portal/setup.py b/setup/l10n_be_cooperator_portal/setup.py deleted file mode 100644 index 28c57bb64..000000000 --- a/setup/l10n_be_cooperator_portal/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=['setuptools-odoo'], - odoo_addon=True, -)