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.


Odoo qweb dynamic html generation [Closed]

Paul Catinean
on 1/20/15, 2:45 AM 372 views

The Question has been closed for reason: duplicate question

on 01/20/2015 02:59:29

Hello everyone

I wanted to know how does one handle a dynamically generated xml code that is invalid before being proccessed 

For example generating a table that displays the information in two cells per row:

<t t-foreach="list" t-as="item">

    <tr t-if="item_even">

        <td><span t-field="item"></td>

    </tr t-if="item_odds>


This will not work since it's invalid xml because the closing tag has a property and neither will <t t-if="condition"> </tr> </t> since the closing tag is embeded in what the xml sees another tag

Alternatives to this would be looping over the grouped item and having two columns defined per <tr> in one loop but that means we will have duplicate content or as much repetetive content as there are column in the table which is not a good solution imo

Any way around this?

About This Community

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

Question tools

1 follower(s)


Asked: 1/20/15, 2:45 AM
Seen: 372 times
Last updated: 3/16/15, 8:10 AM