Se rendre au contenu
Menu
Cette question a été signalée
3053 Vues

I made a RML report, which is working perfect. In the translation files the strings in the RML are included, so I can translate the content of the report. But there is one case in which strings are not recognized, therefore these can't be translated. I'm going to put an example:

Next line is working, "Category" is recognized by the translation files and I can translate it there.

<para style="terp_tblheader_General_Centre">Category</para>

Next one isn't working:

<para>[[ o.type == 'r' and 'Registration' or 'Deregistration' ]]</para>

That is the unique case in which strings are not being recognized. type is a selection field (which can take the values 'r' or 'd'), and I wrote that line to see in the report Registration (in case of type valueing 'r') or Deregistration (in case of type valueing 'd'). But Registration and Deregistration are not being recognized as words to translate.

I saw this post:

https://www.odoo.com/forum/help-1/question/translation-of-strings-in-python-code-in-rml-reports-1962

And I tried to write _('Registration') / _('Deregistration') and then _(Registration) / _(Deregistration) instead of 'Registration' / 'Deregistration', but in this case the string do not even appear in the report.

Anyone can help me, please?

Avatar
Ignorer