Odoo Help

0

qweb and cls evaluation

By
LABRIKI Fouad
on 3/31/14, 8:28 AM 940 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.

About This Community

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

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 3/31/14, 8:28 AM
Seen: 940 times
Last updated: 3/16/15, 8:10 AM