Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8458 มุมมอง

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.

Regards.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Tanzil,

Add link for each object of the thumbnail  like this

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

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

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
พ.ค. 25
2605
0
ธ.ค. 23
2346
1
ก.ค. 23
2373
0
ก.ค. 22
1875
Odoo? Why this new name? แก้ไขแล้ว
3
ก.ย. 21
21825