Odoo Help

0
3 Answers
0
Avatar

Niyas Raphy

--Niyas Raphy--
14510
| 6 6 9
Calicut, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
6/1/18, 7:41 AM

Hi,

You can create a page for the admission purpose on the website and then upon clicking the submit button of the form,  you will get the entered values in the route of the corresponding page.

From this route, you can create a record in the backend.

Creating template:


<template id="support_submit_ticket" name="Submit Support Ticket" page="True">
<form action="/support/ticket/process" method="POST" class="form-horizontal mt32" enctype="multipart/form-data">
<div class="form-group">
<div class="col-md-offset-3 col-sm-offset-4 col-sm-8 col-md-7">
<button class="btn btn-primary btn-lg">Submit Ticket</button>
</div>
</div>
</form>
</template>


Then upon clicking the submit button, you will get the entered values in the route: /support/ticket/process

@http.route('/support/ticket/process', type="http", auth="public", website=True, csrf=True)
def support_process_ticket(self, **kwargs):
# in **kwargs you will get values from the form
# using this you can create record in the backend
values = {
# set the values
}
request.env['model_name'].sudo().create(values)
return werkzeug.utils.redirect("/support/ticket/thanks")


For more you can have a look at this module available in the odoo apps store :  https://www.odoo.com/apps/modules/10.0/website_support/


Thanks

0
Khalid Hazam
6/1/18, 8:49 PM

This module might help you streamline the website form creation a bit: https://www.odoo.com/apps/modules/10.0/cms_form/

Or as Niyas Raphy stated you can create your own templates by getting some inspiration from existing modules like https://www.odoo.com/apps/modules/11.0/website_hr_recruitment/.

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now