Skip to Content
Menu
This question has been flagged

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?

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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.

Author

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.

Related Posts Replies Views Activity
1
Jun 24
266
1
Aug 19
3440
1
Jun 24
2406
2
Apr 24
1001
1
Dec 22
3057