diff --git a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py index 20d9e2d..a9bd75a 100644 --- a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py +++ b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py @@ -187,7 +187,7 @@ class TaxShelterDeclaration(models.Model): class TaxShelterCertificate(models.Model): _name = "tax.shelter.certificate" - _inherit = ['portal.mixin'] + _inherit = ["portal.mixin"] _description = "Tax Shelter Certificate" _order = "cooperator_number asc" @@ -281,7 +281,9 @@ class TaxShelterCertificate(models.Model): def _compute_access_url(self): super()._compute_access_url() for certificate in self: - certificate.access_url = '/my/tax_shelter_certificates/%s' % (certificate.id) + certificate.access_url = "/my/tax_shelter_certificates/%s" % ( + certificate.id + ) def generate_pdf_report(self, report_type): report, name = REPORT_DIC[report_type] diff --git a/easy_my_coop_website_taxshelter/__manifest__.py b/easy_my_coop_website_taxshelter/__manifest__.py index 2acdd25..19eb1c4 100644 --- a/easy_my_coop_website_taxshelter/__manifest__.py +++ b/easy_my_coop_website_taxshelter/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Easy My Coop Tax Shelter Website", "version": "12.0.1.0.0", - "depends": ["website", "portal", "easy_my_coop_taxshelter_report",], + "depends": ["website", "portal", "easy_my_coop_taxshelter_report"], "summary": "Give access to Tax Shelter Report in the website portal.", "author": "Coop IT Easy SCRLfs", "license": "AGPL-3", diff --git a/easy_my_coop_website_taxshelter/controllers/main.py b/easy_my_coop_website_taxshelter/controllers/main.py index 4417fdf..7263e98 100644 --- a/easy_my_coop_website_taxshelter/controllers/main.py +++ b/easy_my_coop_website_taxshelter/controllers/main.py @@ -2,14 +2,16 @@ # 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, ) -from odoo.exceptions import AccessError, MissingError -from odoo.http import request -from werkzeug.exceptions import Forbidden, NotFound class PortalTaxShelter(CustomerPortal): @@ -116,7 +118,7 @@ class PortalTaxShelter(CustomerPortal): report_type=None, download=False, query_string=None, - **kw, + **kw ): partner = request.env.user.partner_id try: