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

Hi, everbody,

I understand, all what i put in my "static" path, the file is freely available throught http://?????/module_name/static/file.txt

But, i need Block some files with the simplicity of put them in a local folder and have available __only__ if I ame logged.

With Controllers and complete or partial path doesn't work.


class Controller(odoo.http.Controller): 
    @route('/module_name/static/pdf/file.pdf', auth='user')  # Isn't Work
    @route('/module_name/static/pdf', auth='user')              # Work when i'm accessing http://url/module_name/static/pdf
    def handler(self):
        pass


Thanks.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 23
3071
1
พ.ย. 20
6384
0
ส.ค. 20
3810
Overriding "Product" in odoo 12 website? แก้ไขแล้ว
2
ธ.ค. 19
3812
Website: Method post does not work แก้ไขแล้ว
1
มี.ค. 18
6682