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

Why the exported translation of my custom module is empty?

By
Juan Formoso
on 2/2/15, 12:16 PM 665 views

I've created a module which only modifies an existing RML report to add new columns, labels and functionalities. It's working great.

The problem is in the translation files. To translate my module, I do the same as always, use the OpenERP interface as a standard user, go to configuration > translations > export / import > export translation. I select my module, but the exported translation only has the header, and nothing more.

The labels and strings I added to the report aren't being recognized. Can anyone tell me why?

Thank you in advance!

2

Akhil P Sivan

--Akhil P Sivan--
3423
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 2/3/15, 12:41 AM

Have you imported openerp.tools.translate import _ and kept the strings inside _( "sample string") ?

Thank you Akhil. I hadn't imported the library in the Python code. I 've just done it and add the _(" ") to some labels, but still same result. It's weird because I did several reports and I've never needed to write _(" ") around the words, they were automatically recognized by the translation tool.

Juan Formoso
on 2/3/15, 3:29 AM

In reports you don't need to use "_()". if some field strings, warnings or some texts, you need to translate, it should be used I think. In reports, like you told, it detects automatically.

Akhil P Sivan
on 2/3/15, 4:29 AM

Finally, I created the translation file manually and it works (I was able to this because there were only a few terms to translate). However, even doing the translation file by myself, a term isn't being translated, the sentence just after the OR: [[ (o.comment and format(o.comment)) or "Please, indicate the invoice number on the concept of income" ]] Which could be the problem?

Juan Formoso
on 2/3/15, 5:19 AM

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: 2/2/15, 12:16 PM
Seen: 665 times
Last updated: 3/16/15, 8:10 AM