Odoo Help


How can I display a PDF stored in the database in a web browser?

on 4/14/13, 3:09 PM 2,108 views

Hello! I develop a module that stoks file into open erp db. Those file are pdf. I can easyly download them using the binary field file name. However, supposed that the browser of the client allows to show pdf files, is it possible to open this file into a other page of my browser? I've already done this with a simple url, but the same this with a file doesn't work, due to a problem of url...I known what's the problem but I ignore how to resolve this problem. I've already search into other post, but nothing was found.

Sorry for my english and a great thanks in advance of yours answser.


It's hard for anybody to help you if we don't know any more details. What is the problem with the URL? Perhaps you could post the URL so that we can see if at least it is valid?

Lorenzo Cabrini
on 4/14/13, 8:33 PM

When I said "problem of url" it's mean that when it's an url, it's easy because just have to give the string value like this: return { 'type': 'ir.actions.act_url', 'url':'http://www.google.com', 'target': 'new', } that perfectly works. But I need to do the same things but with a pdf...to display it into the browser of the client. Open it like a "iframe"...If somebody know how to do it...thanks

on 4/17/13, 11:15 AM

@John Do you find any solution? I have same requirement. My files are of type mp3. I implemented "download" using binary field. Now i want a "Play" link which will play mp3 in browser. Please help me!!

on 9/21/13, 4:43 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

0 follower(s)


Asked: 4/14/13, 3:09 PM
Seen: 2108 times
Last updated: 3/16/15, 8:10 AM