Skip to Content
Menu
This question has been flagged
2 Replies
28875 Views

Version : Odoo10

Purpose: Add a new page in website

 


Avatar
Discard
Best Answer

Hi Mohan,


You can simply create an XML record for a webpage:

<?xml version="1.0" encoding="utf-8"?>
  <odoo>
    <data>
      <!-- webpage record -->
<template id="new_web_page" name="Your page name" page="True">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<!-- Your content here -->
</div>
</t>
</template>
</data> </odoo> </xml>


You then also need a controller to call this webpage, which looks like this:

# -*- coding: utf-8 -*-
import odoo.http as http

class your_class(http.Controller):
@http.route('/custom/url', type='http', auth='user', website=True)
def show_custom_webpage(self, **kw):
return http.request.render('your_module.new_web_page', {})

In this example you would have a new page under http://your-odoo.com/custom/url.
For more information look at https://www.odoo.com/documentation/10.0/howtos/website.html

Regards,

Yenthe

Avatar
Discard
Author

Thank You Bro.... I Got it

Hi

How to do it in odoo11 ?

Best Answer

Hi,

You can add a new page in the website by adding a template,


<template id="paid_thank_you" name="Thank you" page="True">
<t t-call="website.layout">
<form>
<div class="form-group" style="text-align: center; padding-top: 11%; padding-bottom: 10%;">
<h1>Thank you, Paid successfully</h1>
</div>
</form>
</t>
</template>

Thank You

Avatar
Discard
Related Posts Replies Views Activity
4
Jan 24
3576
1
Sep 23
857
1
Jan 17
7294
1
Mar 15
2338
0
Mar 15
5118