Browse Source

[FIX] emc_w_taxshelter: PDF download issue

pull/1/head
Rémy Taymans 7 years ago
parent
commit
12c4d181f4
  1. 1
      easy_my_coop_website_taxshelter/__openerp__.py
  2. 16
      easy_my_coop_website_taxshelter/controllers/main.py

1
easy_my_coop_website_taxshelter/__openerp__.py

@ -23,6 +23,7 @@
'website', 'website',
'website_portal_v10', 'website_portal_v10',
'easy_my_coop_taxshelter_report', 'easy_my_coop_taxshelter_report',
'report',
], ],
'data': [ 'data': [

16
easy_my_coop_website_taxshelter/controllers/main.py

@ -101,12 +101,12 @@ class CooperatorWebsiteAccount(WebsiteAccount):
# Get the pdf # Get the pdf
report_mgr = request.env['report'].sudo() report_mgr = request.env['report'].sudo()
pdf = report_mgr.get_pdf( pdf = report_mgr.get_pdf(
tax_shelter.ids,
tax_shelter,
'easy_my_coop_taxshelter_report.tax_shelter_subscription_report' 'easy_my_coop_taxshelter_report.tax_shelter_subscription_report'
) )
filename = "Subscription Certificate - {name} - {year}".format(
name=partner.name,
year=tax_shelter.declaration_id.fiscal_year
filename = "Subscription Certificate - %s - %s" % (
partner.name,
tax_shelter.declaration_id.fiscal_year
) )
return self._render_pdf(pdf, filename) return self._render_pdf(pdf, filename)
@ -131,12 +131,12 @@ class CooperatorWebsiteAccount(WebsiteAccount):
# Get the pdf # Get the pdf
report_mgr = request.env['report'].sudo() report_mgr = request.env['report'].sudo()
pdf = report_mgr.get_pdf( pdf = report_mgr.get_pdf(
tax_shelter.ids,
tax_shelter,
'easy_my_coop_taxshelter_report.tax_shelter_shares_report' 'easy_my_coop_taxshelter_report.tax_shelter_shares_report'
) )
filename = "Share Certificate - {name} - {year}".format(
name=partner.name,
year=tax_shelter.declaration_id.fiscal_year
filename = "Share Certificate - %s - %s" % (
partner.name,
tax_shelter.declaration_id.fiscal_year
) )
return self._render_pdf(pdf, filename) return self._render_pdf(pdf, filename)

Loading…
Cancel
Save