Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
10040 Tampilan

Hi,

I'm new to openerp addon development and I'm trying to add functionality to openerp's document management system that allows the user to view pdfs within the browser rather than downloading the pdf which is the default behavior.

The approach I'm aiming to take is to create a custom widget using mozilla's pdf.js library and apply it to a copy of the 'datas' binary field within the document_view.xml on a separate notebook page (after verifying that the document is actually a pdf of course). For example:

...
<page string="View Pdf">
    <field name="datas" filename="datas_fname" widget="pdfviewer"/>
</page>

I've taken a gander at a tutorial suggested on another question (Can't post link due to low karma) but the widget that is created is just a Facebook widget with no obvious (at least to me) interaction with data originally in the field.

Is this the correct way to approach something like this? or rather, is this how widgets work? and if so how could i get the binary data through javascript?

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jul 24
1196
1
Jun 24
4208
1
Jul 23
3795
5
Jun 23
34257
0
Mar 24
2733