Odoo Help


How to override a module translation?

on 1/16/15, 8:12 AM 2,901 views

Hallo, how could I write a module whose i18n/it.po overrides some translations of the i18n/it.po of another module?


For a better dealing with my question I'm posting the module (some term are fictitious) since I'm quite unsure of the .po file structure 


from openerp.osv import osv, fields

class project_inherit(osv.osv):
    _inherit = 'project.project'


#. module: my_translation_module
#: view:project.project:project.edit_project
msgid "Close Project"
msgstr "Terminare Progetto"

#. module: base
#: model:ir.module.module,summary:base.module_project
msgid "Projects, Tasks"
msgstr "Progetti, Tasks"

John Baldwin
On 1/16/15, 3:14 PM

Inherit the original module and place the new file is the exact same directory/path (in the new module) that the original file is located in, in the original module. I hope that makes sense.

new Inherited module >i18n>it.po <-updated version

original module>i18n>it.po <-original. 

The inherited should override the original.

or simply modify the original translation file in POedit and install the new translation.

John Baldwin
on 1/16/15, 3:16 PM

To overwrite original translation, the following values must be added to command line server

--i18n-overwrite -u new_Inherited_module

Jose Gpe Osuna
on 11/10/17, 9:38 AM
Jose Gpe Osuna
On 11/10/17, 9:38 AM

To overwrite original translation, the following values must be added to command line server

--i18n-overwrite -u new_Inhertied_module

On 1/17/15, 2:16 AM

[Mine is not an answer (the weird Odoo forum tool configuration doesn't let me comment).]

@John: thank you for replying and for pointing me in a right direction.

Actually importing is working fine, whilst the "module way" is not working (the .po is the same): am I expected to do some operation other than updating the module, restarting Odoo, restarting the OS?

To my understanding it should work. I would visit the structure of your inheritance. Make sure you have inherited the original module in a way that it will override existing fields by changing a string. If that works and the path is absolutely the same to the po file it should override as well. the last thing to do would be to re-install the translation. As I understand it translation are installed into the DB and not pulled from po files at run time.

John Baldwin
on 1/17/15, 8:54 AM

After reading your question a second time I see that you did not install (re-install) the changed translation. That would cause it not to load... Again the are loaded from the DB not the file after installation.

John Baldwin
on 1/17/15, 8:58 AM

Thank you again, I'm posting the code since reinstalling doesn't work

on 1/18/15, 4:14 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/16/15, 8:12 AM
Seen: 2901 times
Last updated: 11/10/17, 9:38 AM