跳至内容
菜单
此问题已终结

By adding a template we can get a page in v11 and how to create a page in v12? Any idea...

v11 example:

<template id="thanks_try_now_page_template">
<t t-call="website.layout">
<div id="wrap">
<div class="container text-center">
                <div class ="flex-container">
    <div class="form6">
        <h2 class="text-center"> Thank You</h2><br />
                <h4 class="text-center"> Use the below link and credential to login into odoo</h4>
                <h4><strong>Odoo 11 : <a href="https://demo.odoo.com/" target="_blank"><span> demo.odoo.com</span><i class="fa fa-link"></i></a></strong></h4><br />
    </div>
                </div>
    </div>
</div>
<!-- === Snippets' area === -->
    <div class="oe_structure" /></div>
</t>
</template>


<record id="thanks_try_now_page" model="website.page">
<field name="name">Thanks try now page</field>
<field name="website_published">True</field>
<field name="url">/thanks_try_now</field>
<field name="view_id" ref="thanks_try_now_page_template"/>
</record>

    
Facing internal error on migrating this from v11 to v12.Any idea how to solve in v12 using template to create a page ?
For V12?

形象
丢弃
最佳答案

Hi,

The issue is that there is an extra div closing in the template, please try with below code.


<template id="thanks_try_now_page_template">
<t t-call="website.layout">
<div id="wrap">
<div class="container text-center">
<div class ="flex-container">
<div class="form6">
<h2 class="text-center"> Thank You</h2><br />
<h4 class="text-center"> Use the below link and credential to login into odoo</h4>
<h4><strong>Odoo 11 : <a href="https://demo.odoo.com/" target="_blank"><span> demo.odoo.com</span><i class="fa fa-link"></i></a></strong></h4><br />
</div>
</div>
</div>
</div>
<div class="oe_structure" />
</t>
</template>



<record id="thanks_try_now_page" model="website.page">
<field name="name">Thanks try now page</field>
<field name="website_published">True</field>
<field name="url">/thanks_try_now</field>
<field name="view_id" ref="thanks_try_now_page_template"/>
</record>


See the created page:-


Thanks

形象
丢弃
编写者

The above code I just missed the container div while copy paste but the exact error.

When I put the pages URL as localhost:8071//thanks_try_now the page won't arise showing 500 internal error.

编写者

Pages URL :

http://localhost:8071/thanks_try_now

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

相关帖文 回复 查看 活动
1
6月 24
1169
1
8月 19
4302
2
7月 25
3540
1
6月 24
3412
1
12月 22
4253