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.

0

qweb and cls evaluation

By
LABRIKI Fouad
on 3/31/14, 8:28 AM 806 views

Can someone explain how what #{cls}" means in the qweb tempalting as in this example (extract from the official qweb site):

                      -----------------

div t-name="example_template" t-attf-class="base #{cls}"

                     -----------------

what does cls means (class?) but how the evalution is done agains a context like this:

                  ------------

{ "class1": "foo", "title": "Random Title", ...

                  ------------

Thanks,

0
LABRIKI Fouad
On 3/31/14, 1:26 PM

Aftre some tests, I think that lline in the example from the qweb site is mistaken. In fact this line:

                -----------------

div t-name="example_template" t-attf-class="base #{cls}"

                 -----------------

Should be:

                -----------------

div t-name="example_template" t-attf-class="base #{class1}"

                 -----------------

hope tis helpes someone having the same question.

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: 3/31/14, 8:28 AM
Seen: 806 times
Last updated: 3/16/15, 8:10 AM