Browse Source

[IMP] emc_taxshelter_report,emc_website_taxshelter: pre-commit

pull/106/head
Vincent Van Rossem 5 years ago
parent
commit
411112f729
  1. 6
      easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py
  2. 2
      easy_my_coop_website_taxshelter/__manifest__.py
  3. 10
      easy_my_coop_website_taxshelter/controllers/main.py

6
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]

2
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",

10
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:

Loading…
Cancel
Save