Skip to content

Commit

Permalink
[FIX] portal_event_tickets: исправили выбор шаблона для бейджика
Browse files Browse the repository at this point in the history
  • Loading branch information
em230418 committed Dec 2, 2024
1 parent c502e43 commit ddb77ea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions portal_event_tickets/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ def portal_get_ticket(self, ticket_id=None, **kw):
if not self._has_ticket_access(ticket):
raise Forbidden()

registration_badge_template = (
report_template_for_portal.get_metadata()[0].get("xmlid")
if report_template_for_portal
else "event.action_report_event_registration_badge"
)
if report_template_for_portal:
registration_badge_template = report_template_for_portal.report_name
else:
# fmt: off
registration_badge_template = "event.event_registration_report_template_badge" # noqa: E501
# fmt: on

pdf = (
request.env["ir.actions.report"]
Expand Down

0 comments on commit ddb77ea

Please sign in to comment.