Hi, i'm trying to get data and render to home view. I'm inherited view and the layout work but i need render product data and i can't do it.
my code
Controllers
class WebsitePersonal(http.Controlle):
@http.route('/', auth='public',website=True)
def show_custom_menu(self, **kwargs):
res = {}
products = request.env['product.template'].search([])
res = {
'productos': products,
}
return http.request.render('my_module.id_template',res)
xml
<template id="id_template" inherit_id="website.layout">
<xpath expr="//div[@id='inherit_id']/header" position="replace">
<!-- TRYING TO SHOW THE RENDERED ELEMENTS RENDERED -->
<t t-foreach="productos" t-as="prod">
<t t-esc="prod.name"/><br/>
</t>
</xpath>
</template>
but the data is not rendered. Help me please
Odoo WEB Controller:
1- https://goo.gl/gPjPas
2- https://goo.gl/SEHNbA
Sehrish Pakistán I made the view and controller and it works, well more or less because when i try to inherit a home page and render product there, the products are not shown, but when i just render a template calling a website.layout, the products are shown here. Ej: <t t-call="website.layout"> </t> .
I need inherit home page to show product there, but i don't know how I can do it