Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
6015 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit

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 Odpovědi Zobrazení Aktivita
0
led 22
1591
4
čvc 24
6648
2
čvc 24
2580
4
čvn 24
25262
4
kvě 24
12617