Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3431 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

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.

Tekijä

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.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
kesäk. 24
1170
1
elok. 19
4303
2
heinäk. 25
3540
1
kesäk. 24
3412
1
jouluk. 22
4254