Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2848 Prikazi

my controller is pretty simple,

code:

@http.route('/booking_success',type='http', auth='public',website=True)
    def handler_booking_success(self,**kwargs):
        values={}
        print(kwargs)
        _logger.info(str(kwargs))
        return request.render("dym_customer_booking.booking_success", values)

form action :

<form role="form" action="/booking_success" method="POST" class="s_website_form container-fluid mt32" enctype="multipart/form-data">


but after submit button the route in log become
POST /booking_successundefined HTTP/1.0" 404


Avatar
Opusti

Hi please did you solve your problem. I am facing the same issue

Is this resolved?

Best Answer
                    

to the action of the form the data model is added to the end like

action + force_action OR model_name

where both force_action and data_model are attributes of the form tag

in this case you could do

form data-force_action="YOU_CONTROLLER_URL" action="" method="post" enctype="multipart/form-data" class="o_mark_required" data-mark="*" data-pre-fill="true" data-model_name=""
Avatar
Opusti