Odoo Help

Welcome!

This community 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.

3

Inherit a template in base.xml

By
anonymous
on 2/1/14, 8:13 PM 2,488 views

Hi;

I want to inherit and modify template t-name = "TreeView.rows" in base.xml.

I want to change the line 691 :

<t t-set="style" t-value="'background-position: ' + 19*(level) + 'px; padding-left: ' + (4 + 19*(level)) + 'px;'"/>

to

  <t t-set="style" t-value="'background-position: ' + 25*(level) + 'px; padding-left: ' + (4 + 25*(level)) + 'px;'"/>

how can I get the xpath element , I like that in my base.xml but it does not work :

<templates id="template" xml:space="preserve">
<t t-extend="TreeView.rows">
    <t t-jquery="style" t-operation="replace">
           <t t-set="style" t-value="'background-position: ' + 25*(level) + 'px; padding-left: ' + (4 + 25*(level)) + 'px;'"/>
    </t>
</t>
</templates>

Thanks.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/1/14, 8:13 PM
Seen: 2488 times
Last updated: 3/16/15, 8:10 AM