Community mailing list archives

community@mail.odoo.com

Field translation not loaded when translate = True

by
Yassine TEIMI
- 07/01/2016 06:16:57
Hey there,

In the model :  ir_actions_report_xml, the translate attribute for the name field is set to True, so when I translate the report action name, the translation is not loaded when I download the report. (the filename is the ir_actions_report_xml name)

In fact, the report_download controller method (report module) get's the filename directly from database, wich is stored in english, not with its translation.

I inherited the name field, and used _setup_field, to set translate to False:

from openerp import models, api

class IrActionsReportXml(models.Model):
    _inherit = 'ir.actions.report.xml'

    @api.model
    def _setup_fields(self, partial):
        super(IrActionsReportXml, self)._setup_fields(partial)
        self._fields['name'].translate = False


But the behaviour is the same.

Is there any hint about this ?

Thanks.

--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-87 71 41 18