Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3202 Ansichten

Hi !

I am trying to change the attendees modal into a whole page instead, but I am struggling with the controller.

Once I click on "Order Now" on the event tickets page, it is supposed to send the information on a new page instead of a modal.My problem is that I don't know what king of return value I am supposed to write in order to make it work.

Here is my controller :

@http.route(['/event/<model("event.event"):event>/registration/new'], type='json', auth="public", methods=['POST'], website=True)
def registration_new(self, event, **post):
tickets = self._process_tickets_details(post)
if not tickets:
return request.redirect("/event/%s" % slug(event))
return request.env['ir.ui.view'].render_template("my_module.registration_attendee_details", {'tickets': tickets, 'event': event})


I know that my problem is that my controller is type='json' and I need a type='http' in order to be able to make a redirection to another page, but I can't find how I am supposed to do. I also know that my return has to be like:

return request.render("my_module.registration_attendee_details", {'tickets': tickets, 'event': event})"

Any help would be greatly appreciated,

Many thanks !

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
7
Jan. 24
50121
2
Okt. 20
3918
0
Feb. 21
3638
1
Jan. 20
9374
0
März 15
13049