Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Translation for computed fields does not work (8.0)

by
Maxim Litnitskiy
- 10/22/2014 06:52:02
Nice.
Shall I use string=_('Bla-bla') for ordinary field and string='Bla-bla' for computed?


2014-10-22 14:22 GMT+04:00 Pedro Manuel Baeza Romero <pedro.baeza@gmail.com>:
Yo have to put only:

state = fields.Html(compute='_get_state', string='State')

and you will get 'State' translated.

Regards.

2014-10-22 11:27 GMT+02:00 Maxim Litnitskiy <litnimaxster@gmail.com>:
Hi all!
Just found out that 
state = fields.Html(compute='_get_state', string=_('State'))
and
<field name='state'/> 
does not work.
I do have State field translated.
Unless I add 
<field name='state' string='State'/>
In this case State is translated in the view.
Anyone can confirm the bug?

Regards,
Max.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe