Odoo Help


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.


Inherit a template in base.xml

on 2/1/14, 8:13 PM 2,372 views


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;'"/>


  <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;'"/>


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)


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