Sari la conținut
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Property Management
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Suport

Cannot Overwrite Existing Terms in loading translation. Get error ON CONFLICT DO UPDATE.

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
translationodoo12
2 Răspunsuri
6552 Vizualizări
Imagine profil
Samo Arko

I have a big problem, a user exported translation for 10+ modules (17000+ translations), then he imported it on a few odoo instances. Now when you want to load a language with  Overwrite Existing Terms it throws 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.

I've updated odoo 12 to the latest version from git. Checked every custom modules translation file that thy are for odoo 12 and that there are no duplicates. I've even tried to add DISTINCT to the SQL that are in ir_translation.py. Cannot find the table tmp_ir_translation_import to check and remove the duplicated records. If I found the table I don't even know how to find the duplicated records.


Any suggestion how to fix this would be greatly appreciated!


FULL ERROR:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo12/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo12/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/odoo12/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/odoo12/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo12/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo12/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo12/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo12/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo12/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo12/addons/web/controllers/main.py", line 966, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo12/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo12/odoo/api.py", line 759, in call_kw
    return _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo12/odoo/api.py", line 746, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo12/addons/website/wizard/base_language_install.py", line 25, in lang_install
    action = super(BaseLanguageInstall, self).lang_install()
  File "/opt/odoo/odoo12/odoo/addons/base/wizard/base_language_install.py", line 36, in lang_install
    mods.with_context(overwrite=self.overwrite)._update_translations(self.lang)
  File "/opt/odoo/odoo12/odoo/addons/base/models/ir_module.py", line 890, in _update_translations
    self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
  File "/opt/odoo/odoo12/addons/website/models/ir_translation.py", line 11, in load_module_terms
    res = super().load_module_terms(modules, langs)
  File "/opt/odoo/odoo12/odoo/addons/base/models/ir_translation.py", line 811, in load_module_terms
    tools.trans_load(self._cr, base_trans_file, lang, verbose=False, module_name=module_name, context=context)
  File "/opt/odoo/odoo12/odoo/tools/translate.py", line 1016, in trans_load
    result = trans_load_data(cr, fileobj, fileformat, lang, verbose=verbose, module_name=module_name, context=context)
  File "/opt/odoo/odoo12/odoo/tools/translate.py", line 1160, in trans_load_data
    irt_cursor.finish()
  File "/opt/odoo/odoo12/odoo/addons/base/models/ir_translation.py", line 156, in finish
    """ % (self._model_table, self._table))
  File "/opt/odoo/odoo12/odoo/sql_db.py", line 148, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo12/odoo/sql_db.py", line 225, in execute
    res = self._obj.execute(query, params)
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.
0
Imagine profil
Abandonează
Imagine profil
Samo Arko
Autor Cel mai bun răspuns

The problem was the OCA website_legal_page module. Checked all the translation files and didn't see any same msgid. So then I just added logging in ir_translation.load_module_terms method to log module_name and website_legal_page was the last one before crash. Deleted its i18n dir and now it works. 

Odoo could at least had better logging that would write the modules name. 

2
Imagine profil
Abandonează
Imagine profil
David Kovač
Cel mai bun răspuns

need some karma pls

0
Imagine profil
Abandonează
Îți place discuția? Nu doar citi, alătură-te!

Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!

Înscrie-te
Postări similare Răspunsuri Vizualizări Activitate
ON CONFLICT DO UPDATE problem Rezolvat
translation odoo12
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
ian. 24
33571
Survey User
odoo12
Imagine profil
1
apr. 26
4187
Translations for the top menu URL's
translation
Imagine profil
0
dec. 24
3221
downloading the po file
translation
Imagine profil
Imagine profil
Imagine profil
2
feb. 24
4775
Odoo Mail Sending Limit Rezolvat
odoo12
Imagine profil
Imagine profil
Imagine profil
2
dec. 23
18637
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now