Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

12.0 module upgrade / translation issue #88

@ghost

Description

i run a module-upgrade and get this error:

2019-06-20 20:09:54,679 54 INFO test odoo.addons.base.models.ir_translation: module website_support: loading translation file (de) for language de_DE 
2019-06-20 20:09:54,679 54 INFO test odoo.tools.translate: loading /usr/share/odoo/3rd-addons/website_support/i18n/de.po 
2019-06-20 20:09:54,739 54 ERROR test odoo.sql_db: bad query: b" INSERT INTO ir_translation(name, lang, res_id, src, type, value, module, state, comments)\n                           SELECT name, lang, res_id, src, type, value, module, state, comments\n                           FROM tmp_ir_translation_import\n                           WHERE type = 'model'\n                           AND noupdate IS NOT TRUE\n                           ON CONFLICT (type, lang, name, res_id) WHERE type = 'model'\n                            DO UPDATE SET (name, lang, res_id, src, type, value, module, state, comments) = (EXCLUDED.name, EXCLUDED.lang, EXCLUDED.res_id, EXCLUDED.src, EXCLUDED.type, EXCLUDED.value, EXCLUDED.module, EXCLUDED.state, EXCLUDED.comments)\n                            WHERE EXCLUDED.value IS NOT NULL AND EXCLUDED.value != '';\n                       "
ERROR: 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.
 
2019-06-20 20:09:54,745 54 WARNING test odoo.modules.loading: Transient module states were reset 
2019-06-20 20:09:54,796 54 ERROR test odoo.modules.registry: Failed to load registry 
Traceback (most recent call last):
  File "/usr/share/odoo/odoo/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 417, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 231, in load_module_graph
    module.with_context(overwrite=overwrite)._update_translations()
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_module.py", line 885, in _update_translations
    self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_translation.py", line 825, in load_module_terms
    tools.trans_load(self._cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
  File "/usr/share/odoo/odoo/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 "/usr/share/odoo/odoo/odoo/tools/translate.py", line 1160, in trans_load_data
    irt_cursor.finish()
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_translation.py", line 156, in finish
    """ % (self._model_table, self._table))
  File "/usr/share/odoo/odoo/odoo/sql_db.py", line 148, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/odoo/odoo/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.

2019-06-20 20:09:54,799 54 CRITICAL test odoo.service.server: Failed to initialize database `test`. 
Traceback (most recent call last):
  File "/usr/share/odoo/odoo/odoo/service/server.py", line 1116, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/usr/share/odoo/odoo/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 417, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/share/odoo/odoo/odoo/modules/loading.py", line 231, in load_module_graph
    module.with_context(overwrite=overwrite)._update_translations()
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_module.py", line 885, in _update_translations
    self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_translation.py", line 825, in load_module_terms
    tools.trans_load(self._cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
  File "/usr/share/odoo/odoo/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 "/usr/share/odoo/odoo/odoo/tools/translate.py", line 1160, in trans_load_data
    irt_cursor.finish()
  File "/usr/share/odoo/odoo/odoo/addons/base/models/ir_translation.py", line 156, in finish
    """ % (self._model_table, self._table))
  File "/usr/share/odoo/odoo/odoo/sql_db.py", line 148, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/odoo/odoo/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.

2019-06-20 20:09:54,800 54 INFO test odoo.service.server: Stopping gracefully 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions