Odoo Help

Welcome!

This community 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.

0

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

By
John
on 4/14/13, 3:09 PM 1,444 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.

J.N.

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

John
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!!

Anuradha
on 9/21/13, 4:43 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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