콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
31825 화면

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

아바타
취소
관련 게시물 답글 화면 활동
5
5월 25
5101
1
9월 23
1820
1
1월 17
8525
1
3월 15
3164
0
2월 25
6570