Odoo Help


How to create website pages in odoo

Md. Tanzilul Hasan Khan
on 11/5/16, 5:18 AM 683 views

I have a thumbnail gallery section on odoo website. That is configurable from backend. Now for each thumbnail I want to create a website page with its contents. How can I do that? I didn't find any reference to do this.




Add link for each object of the thumbnail  like this

<a t-att-href="'/foo/(slug(obj))">
     <!--Print object-->
     <t t-esc="obj.name"/>

In the controller

@http.route(['/foo/<model("Your.Model"):obj>'], type='http', auth='public', website=True)
def action_foo(self, obj, **post):
     return request.website.render('Your_Module.Your_Template', {'object', obj})

Pint the value of that object in temlate

<template id="Your_Module.Your_Template">
     <t t-esc="object.name"/>

All the best !

Haha, I knew you will come to answer :) . Thanks for your support and help.

I will try it and let you know.

Md. Tanzilul Hasan Khan
on 11/5/16, 6:17 AM

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: 11/5/16, 5:18 AM
Seen: 683 times
Last updated: 1/28/17, 10:31 AM