Skip to Content
Menú
This question has been flagged
1 Respondre
3426 Vistes

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
Descartar
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
Descartar
Autor

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.

Autor

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 Respostes Vistes Activitat
1
de juny 24
1165
1
d’ag. 19
4300
2
de jul. 25
3540
1
de juny 24
3412
1
de des. 22
4252