Odoo Help


FileName Attribute(binary Field) Not Working With Wizard

Ali Abdelmonem Mustafa Amer
on 12/29/13, 3:51 AM 2,982 views

Hi Guys

I Have Binary Field In Wizard I Also Add The Name field But Still Get Me Non Type File When Downloading

This Is My Code

from openerp.osv import osv, fields from openerp.tools.translate import _

class pdf_wizard(osv.osv_memory): _name = "pdf.wizard" _columns = { 'pdf_report':fields.binary('PDF File',readonly=True), 'pdf_filename' :fields.char('File name', readonly=True), }

def _get_value_pdf(self, cr, uid, context=None): if context is None: context = {} return context.get('pdf_reports')

_defaults = { 'pdf_report' : _get_value_pdf , 'pdf_filename' : 'Purchase.pdf', }


<openerp> <data> <record id="pdf_wizard_form" model="ir.ui.view"> <field name="name">pdf.wizard.form</field> <field name="model">pdf.wizard</field> <field name="arch" type="xml"> <form string="Print" version="7.0"> <field name="pdf_report" filename="pdf_filename"/>




How I Can Do It ?


Hi, it's a sadly well know issue : https://bugs.launchpad.net/openerp-web/+bug/1252458

Mind & Go, Mind And Go
on 7/4/14, 5:52 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

1 follower(s)


Asked: 12/29/13, 3:51 AM
Seen: 2982 times
Last updated: 3/16/15, 8:10 AM