Skip to content

Commit

Permalink
misc update
Browse files Browse the repository at this point in the history
  • Loading branch information
kanda999 committed Jun 24, 2024
1 parent 795c9e6 commit ad0a666
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions account_invoice_custom_portal_report/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@

class CustomerPortal(CustomerPortal):
def _show_report(self, model, report_type, report_ref, download=False):
if not (model._name == "account.invoice" and model.type == "out_invoice"):
return super()._show_report(model, report_type, report_ref, download)
invoice_report = request.env.user.company_id.customer_invoice_portal_report
if (
model._name == "account.invoice"
and invoice_report
and model.type == "out_invoice"
):
if invoice_report:
external_id = invoice_report.get_external_id()
report_ref = external_id.get(invoice_report.id)
return super()._show_report(model, report_type, report_ref, download)

0 comments on commit ad0a666

Please sign in to comment.