Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
6975 Zobrazení

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', }

pdf_wizard()

<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"/>

            </form>
         </field>
    </record>


</data>

</openerp>

How I Can Do It ?

Thanks

Avatar
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
2
bře 15
7533
3
úno 25
57642
1
bře 15
5982
1
bře 15
7030
0
bře 25
1189