Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
31672 มุมมอง

Version : Odoo10

Purpose: Add a new page in website

 


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

Thank You Bro.... I Got it

Hi

How to do it in odoo11 ?

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Disable - Link "Sign Up" in Header Menue แก้ไขแล้ว
5
พ.ค. 25
5014
1
ก.ย. 23
1739
How to create website pages in odoo แก้ไขแล้ว
1
ม.ค. 17
8446
1
มี.ค. 15
3081
0
ก.พ. 25
6467