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.

0

Why is the binary filename not correctly rendered in a remote distribution but it perfectly does in a local distribution?

By
Luis Masuelli
on 10/27/15, 12:24 PM 212 views

I installed openerp 7 in my local Ubuntu 12 distr0 and a 14.10 distro (server in AWS cloud). Somehow, the same code (yes, verified & versioned: the same code) in both instances does not produce the same -say- output for the exactly same database.

This comes as follows: I have a `fields.binary` widget definition like this:

    <field name="ats_filename" invisible="1" />
    <field name="ats_file" string="Reporte ATS" filename="ats_filename" readonly="1" attrs="{'invisible': [('ats_file', '=', False)]}" />

And it works fine in my local distribution: When I click the widget, I download the file named as ats.xml, ats (1).xml, ats (2).xml, ...

However, when I click in the 14.10 server the exact same link (it is a download widget after all), the filename becomes something like sri_ats_2013_ (being sri.ats.2013 the module name).

What would be the reason?

**Notes**:

  • I put my files in the same state as in the server (they are versioned under git, after all).

  • I backed up a database and restored it in my postgres version (9.3 - both in server and in local).

  • I did not update any modules in the database: the same code is running, the same code will accept the database (and so it does) without problem.

**My former hypotesis**

OE 7 had a bug which sent the Content-Disposition header twice: one with the ugly filename and one (later) with the good filename. The nginx and/or the AWS load-balancer were omitting the second Content-Disposition header, keeping the first. That hypotesis was disproved by accessing the server directly (without balancer/nginx).

Is there a difference between any needed libraries being installed in Ubuntu 12 and Ubuntu 14 which could affect the binary widget behavior?

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

1 follower(s)

Stats

Asked: 10/27/15, 12:24 PM
Seen: 212 times
Last updated: 10/27/15, 12:24 PM