Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi everybody !
I just created a new module to add fields in my invoice. I already created a .po file to translate my fields and it works perfectly inside OpenERP. But when I print my invoice, the translation doesn't works.
I think I have to create a new folder "report" in addons/mymodule and create new files inside but I really have no idea of which files I have to create and which code to put inside.
Someone could help me ?
Many thanks in advance.
In order to translate you need:
- folder called i18n
- file module_name.pot within i18n (example: mymodule.pot)
- file language.po (or languate_country.po) within i18n (example nl.po or nl_BE.po)
For a report, you need lines within the .pot:
#: report:sale.order:0 msgid "Offer" msgstr ""
within the .po:
#: report:sale.order:0 msgid "Offer" msgstr "Offerte"
The issues I have run into are:
- updating the .pot and .po files does not always show on the reports, if these have been stored. So you need to create a new situation and print the report for the first time.
- When you miss an entry in your .po file, there might be a default entry in the database, and that one will be used, even if you update your .po file.
- it does matter where you place your :. A text like "the answer:" will not be translated it you store "the answer" or "the answer :" in your .pot and .po files.
Follow below steps:
1) Go to
Settings ‣ Translations ‣ Import / Export ‣ Export Translations
leave the language to the default (new language/empty template) # DO NOT CHANGE THIS
select the PO File format
select your module
click Export and download the file
2) Add your translation terms in the downloaded file. i.e. msgstr "" section depending on your translation language
3) change the filename to language_iso_code.po
e.g. for portugese => pt.po
4) create i18n folder under your module and add po file in it.
5) restart Odoo
6) Go to:
Settings ‣ Translations ‣ Load a Translation
select translation language (in my eg. Portugese)
make sure you check this : Overwrite Existing Terms
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/7/13, 7:16 AM|
|Seen: 3037 times|
|Last updated: 7/25/15, 8:09 AM|