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.

2

Download File name change

By
Prakash
on 10/28/13, 7:43 AM 2,590 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--
3173
| 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

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: 10/28/13, 7:43 AM
Seen: 2590 times
Last updated: 3/16/15, 8:10 AM