Odoo Help

2

Download File name change

By
Prakash
on 10/28/13, 7:43 AM 2,831 views

Openerp 7 using Wizard File download code used:-

_columns = {
    'vcard_stream': fields.binary('File Stream', readonly=True),
    'vcard_name': fields.char('File name', 40, readonly=True),
}

_defaults = {
    'vcard_name': 'Invoices.txt',
}

xml file:

<field name="vcard_stream" string="File Stream" filename="vcard_name"/>

  <record id="action_customer_invoice_custom" model="ir.actions.act_window">
        <field name="name">Customer Invoice Details </field>
        <field name="res_model">customer.invoice.custom</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="target">new</field>
        <field name="context">{'model': 'account.invoice'}</field>
    </record>

But in the above code downloaded file name shows in res model name replaced with '_' For example downloaded file name shows customer_invoice_custom How to change the file name ? into Invoices.txt

2

Prakash

--Prakash--
3218
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 1/23/14, 5:28 AM

Issue Fixed after changing the main.py file with help of below link

https://launchpadlibrarian.net/159472780/main.py.patch

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.

Register

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)

Stats

Asked: 10/28/13, 7:43 AM
Seen: 2831 times
Last updated: 3/16/15, 8:10 AM