Im working with Odoo 10, i have a big a lot of articles classified by category, and i had installed website module, now i wante to show my articles and categories in one of pages of my website
Asked
Active
Viewed 83 times
1 Answers
2
To build a Website page, you can read the documentation here [https://www.odoo.com/documentation/10.0/howtos/website.html][1]
To resume what you must doing.
The first step is creations of a link with a controller. Like this
from odoo import http
class Product(http.Controller):
@http.route('/products/', auth='public')
def index(self, **kw):
product_ids = self.env['product.product'].search([])
return http.request.render('academy.index', {
'products': product_ids,
})
Seconde step is creations of your template view. Like this
<template id="index">
<title>Products</title>
<t t-foreach="products" t-as="product">
<p><t t-esc="product.name"/></p>
</t>
</template>
It's a simple example. If you want more information you can read the documentation and see example in the code of odoo .

jo541
- 1,155
- 6
- 10
-
-
Sorry but I personally never using the e-comerce builder of odoo. But I have found a little video to help you . https://www.youtube.com/watch?v=ewiPcd0gJmg – jo541 Apr 12 '17 at 12:06
-
Right , i had not installed eCommerce modul , now its work , thak you so mutch – BoutainaAS Apr 12 '17 at 13:56
-
-