diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__init__.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__init__.py index ceea55a..7f6af0e 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__init__.py +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from . import controllers from . import wizard from . import models from . import report diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py index 226bd1f..ba9d4e0 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py @@ -2,7 +2,7 @@ { 'name': 'Odoo 16 Accounting Financial Reports', - 'version': '16.0.2.0.8', + 'version': '16.0.2.0.9', 'category': 'Invoicing Management', 'description': 'Accounting Reports For Odoo 16, Accounting Financial Reports, ' 'Odoo 16 Financial Reports', diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/__init__.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/__init__.py new file mode 100644 index 0000000..65a8c12 --- /dev/null +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import main diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/main.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/main.py new file mode 100644 index 0000000..7a2f323 --- /dev/null +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/controllers/main.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +import json + +from odoo.http import content_disposition, request, route +from odoo.addons.web.controllers.report import ReportController + + +class CustomReportController(ReportController): + + @route() + def report_download(self, data, context=None, token=None): + response = super().report_download(data, context=context, token=token) + + try: + requestcontent = json.loads(data) + url = requestcontent[0] + + if 'report_partnerledger' in url and context: + ctx = json.loads(context) + report_filename = ctx.get('report_filename') + if report_filename: + response.headers['Content-Disposition'] = content_disposition( + report_filename + '.pdf' + ) + except Exception: + pass + + return response diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml index 042dd21..5feec01 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml @@ -15,27 +15,27 @@ text-align: right; } -
All Entries
-All Posted Entries
+ Transakcije: +Sve proknjižene stavke
+Samo proknjižene stavke
| Date | -JRNL | -Account | -Ref | -Debit ( |
- Credit ( |
- Balance ( |
- Currency | +Datum | +ŽURN | +Naziv konta | +Opis | +Duguje ( |
+ Potražuje ( |
+ Saldo ( |
+ Valuta |
|---|