Suppose you'd like to display data from any existing model (custom or not).
How to search on the records you'd like to display? and how to show the values defined on this model ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Search and browse on the object using "request.registry", like this:
<t t-set-='ids' t-value="request.registry['product.product'].search(request.cr, 1, [('website_published','=',True),('category_id.name','ilike','website')], request.context)">
<t t-set-='prods' t-value="request.registry['product.product'].browse(request.cr, request.uid, ids, request.context)">
<t t-foreach="prods" t-as="prod" class="col28-set">
<span t-field="prod.image" t-field-options="{"widget": "image"}" class="img" />
<span t-field="prod.name"/>
</t>
</t>
For the new API, use "request.env".