Skip to Content
Menu
This question has been flagged
3 Replies
5226 Views

I´m creating a localization for Bolivia, and part of it is adding a translation file. Untill Odoo12 i did not have problems with the following steps:

1.- Following the link to generate the .po file https://www.odoo.com/documentation/12.0/reference/translations.html 

2.- Changing the generated .po file with Poedit and adding it to my module

3.- Going to Translations / Languages / Spanish (BO)

4.- Pushing "Activate and Translate"

But in Odoo 13 i get the following error:

psycopg2.ProgrammingError: ON CONFLICT DO UPDATE command cannot affect row a second time
HINT:  Ensure that no rows proposed for insertion within the same command have duplicate constrained values.
What could be the cause of this error? Is something different in Odoo13?
Avatar
Discard
Best Answer

David Morales's answer is correct.. or at least that was the exact issue I was running into as well. 

I followed every step multiple times in creating the language translation file, but nothing seemed to work. My module was named with '-', ie. my-custom-module

I renamed the module and project to use '_', ie. my_custom_module and restarted odoo instance and voila... my module picked up all the spanish translations just fine! 

Avatar
Discard
Best Answer

I'm following the same steps as you and no problems on versions 12.0 or below, but in 13 I can't get the translations to work thought the error I get is different:

2020-01-30 19:48:23,325 459 ERROR industrial-supplies odoo.tools.translate: malformed po file: unknown occurrence: model_terms:ir.ui.view,arch_db:industrial-supplies.external_layout_background_custom_address

This is directly exported from odoo, just downloaded the po and uploaded and I have the error message.

Avatar
Discard

Ok, so I fixed it, my problem was that I was ussing middlescore - instead of underscore in the module name industrial-supplies. Just renamed the module to industrial_supplies and everything worked like a charm.

Related Posts Replies Views Activity
0
Jan 22
1026
4
Jul 24
5045
2
Jul 24
493
4
Jun 24
22360
4
May 24
10070