Odoo Help


How to call model objects at xml qweb?

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


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"/>

Is it possible?

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

on 2/14/17, 5:30 AM

I solved. My question was answer. 

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

Good !

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.


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)


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