Odoo Help

0

How to call model objects at xml qweb?

By
Shameem Babu @ iWesabe
on 2/14/17, 1:59 AM 926 views

Guys

I want to show the objects like following without using python code.

<t t-foreach="code equivalent to request.env['your.model'].search([])"  t-as="obj">
       <t t-esc="obj.name"/>
 </t>

Is it possible?


so you dont need to fetch from template .. do you mean that?

Hilar
on 2/14/17, 5:30 AM
5

I solved. My question was answer. 

<t t-foreach="request.env['your.model'].search([])" t-as="obj">
    <t t-esc="obj.name"/>
</t>


Good !

Hilar
on 2/14/17, 6:48 AM

Nice :D

Nilmar Shereef
on 2/14/17, 11:21 PM

This is awesome!!! - Thanks!

Bista Solutions US, Ray Carnes
on 4/3/17, 8:41 PM

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

1 follower(s)

Stats

Asked: 2/14/17, 1:59 AM
Seen: 926 times
Last updated: 4/12/17, 5:22 AM