Odoo Help

0

website blog

By
Mariano DAngelo
on 8/18/15, 2:47 PM 760 views

When I replace custom footer and intall website blog that module try to find a div inside the footer which I don't want to use:.

Error details:

The element '<xpath expr="//div[@id='info']/ul">'coulnd't be found in father's view

Context Error :

Vista `Footer News Blog Link`
[view_id: 1239, xml_id: n/a, model: n/a, parent_id: 734]" while parsing None:13, near
<data inherit_id="website.footer_default" name="Footer News Blog Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a t-attf-href="/blog/%(website_blog.blog_blog_1)d">News</a></li>
</xpath>
</data>

<template id="theme_custom_footer" name="Custom Footer" inherit_id="website.footer_default">
<xpath expr="//div[@class='container hidden-print']" position="replace">
<div class="container_footer" style="background-color: #d0d0d1;border-top: 4px solid #428bca;">
                My footer
</div>
</xpath>
</template>

0
Mariano DAngelo
On 8/19/15, 7:54 PM

I've to add the div to the replace div "container hidden-print". But I didn't want that funcionality from the web_blog module, core developers should think in don't crash system when the xpath is not found.

I have updated my answer. You just need to make your module depends on website_blog.

Emipro Technologies Pvt. Ltd.
on 8/20/15, 12:53 AM
0

Hi,

When your inheritance of template website.footer_default is changed entire structure of the DIV with class "container hidden-print". But same template is inherited by website_blog module and put some information inside "div[@id='info']/ul". So, website_blog do not get the particular XPATH inside parent view due to your inheritance and replace entire DIV.

So, you have to take care while replace inside any template. To avoid such kind of error you have to inherit templates and replace its content which are dependent on the main template.

Update : Another solution : You just need to put website_blog module inside your 'depends' list of __openerp__.py file.

I hope it is clear to you. If you have any question please write it down.

Thanks.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/18/15, 2:47 PM
Seen: 760 times
Last updated: 8/20/15, 12:52 AM