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.


Dynamic html id attribute value without using python render variable

Sah Vinay Mahabir
on 5/25/16, 8:02 AM 374 views

Here is the dummy code what i am trying to do to achieve something, please check what i want for <p> attribute value during runtime. I dont want the value should be render from python variable.

<t t-foreach="[1,2]" t-as="row_value">

    <div class="row">

        <t t-foreach="[1, 2, 3]" t-as="column_value">

            <p t-attf-id="paragraph_id_{{ row_value * column_value }}"/></p>



Here is what i want to render the id value of <p> tag atttibute.
<p id=paragraph_id_1></p>

<p id=paragraph_id_2></p>  

 <p id=paragraph_id_3></p>

<p id=paragraph_id_4></p>

<p id=paragraph_id_5></p>

<p id=paragraph_id_6></p>  

reda rouichi
On 5/25/16, 1:15 PM

Try this,

<p t-att-id="'paragraph_id_' +  row_value * column_value "/></p>

Kind regards,


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

1 follower(s)


Asked: 5/25/16, 8:02 AM
Seen: 374 times
Last updated: 5/25/16, 1:15 PM