Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3420 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Autore

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.

Post correlati Risposte Visualizzazioni Attività
1
giu 24
1163
1
ago 19
4299
2
lug 25
3536
1
giu 24
3412
1
dic 22
4250