This question has been flagged
3 Replies
3949 Views

Context : Odoo 12, Docker, Apps installed : Accounting, Website + 2 OCA modules

The initial language is English. Impossible to load another language (here French). The operation ends in error.
Here is the trace

=============

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 696, in dispatch result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {})
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw return _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi result = method(recs, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/l10n_multilang/models/l10n_multilang.py", line 105, in lang_install res = super(BaseLanguageInstall, self).lang_install()
  File "/usr/lib/python3/dist-packages/odoo/addons/website/wizard/base_language_install.py", line 25, in lang_install action = super(BaseLanguageInstall, self).lang_install()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/wizard/base_language_install.py", line 36, in lang_install mods.with_context(overwrite=self.overwrite)._update_translations(self.lang)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 877, in _update_translations self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_translation.py", line 778, in load_module_terms tools.trans_load(self._cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
  File "/usr/lib/python3/dist-packages/odoo/tools/translate.py", line 1011, in trans_load result = trans_load_data(cr, fileobj, fileformat, lang, verbose=verbose, module_name=module_name, context=context)
  File "/usr/lib/python3/dist-packages/odoo/tools/translate.py", line 1155, in trans_load_data irt_cursor.finish()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_translation.py", line 156, in finish """ % (self._model_table, self._table))
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 148, in wrapper return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/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.

=============

What can I do about it ? Could you help to sort it out ?
 

Avatar
Discard
Author Best Answer

Thank you for this quick notice.

Unfortunately difficult to test it because I use a Docker implementation. Under "odoo/docker" the image is noted from January 31. This doesn't seem to be the latest version. Here's what I find in the Docker image..

# Install Odoo
ENV ODOO_VERSION 12.0
ARG ODOO_RELEASE=20190128
ARG ODOO_SHA=9e34aaed2eb1e7697aaf36767247dbf335e9fe7a
RUN set -x; \
curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \


My running Odoo version provides information on "Odoo 12.0-20190128 (Community Edition)" ... and the problem is still there !!!

From what I understand of the indicated solution, would it be useful for me to uninstall two "ancillary" applications (Website and Discuss) and three modules (Cancel Journal Entries, Standard Accounting Report, Base report xlsx)?

Do you know the ODOO version that addresses the problem of loading a additional (FR) translation ?

Avatar
Discard
Best Answer



Avatar
Discard
Best Answer

Hi,

I think it's already fixed, please pull the latest source code of odoo12 and see whether you can reproduce this issue in it.

 

See this: https://github.com/odoo/odoo/issues/31583

Also you can check whether you can reproduce the issue in runbot.


Thanks

Avatar
Discard

Hi,I have been able to load Odoo 12 version 24th of April (Docker Image).Unfortunately, the problem remains present... here is the last log.

Thank you for your advice

Sincerely,

Error:

Odoo Server Error

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/usr/lib/python3/dist-packages/odoo/http.py", line 696, in dispatch

result = self._call_function(**self.params)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call

result = self.endpoint(*a, **kw)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__

return self.method(*args, **kw)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 966, in call_button

action = self._call_kw(model, method, args, {})

File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw

return _call_kw_multi(method, model, args, kwargs)

File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "/usr/lib/python3/dist-packages/odoo/addons/l10n_multilang/models/l10n_multilang.py", line 128, in lang_install

res = super(BaseLanguageInstall, self).lang_install()

File "/usr/lib/python3/dist-packages/odoo/addons/website/wizard/base_language_install.py", line 25, in lang_install

action = super(BaseLanguageInstall, self).lang_install()

File "/usr/lib/python3/dist-packages/odoo/addons/base/wizard/base_language_install.py", line 36, in lang_install

mods.with_context(overwrite=self.overwrite)._update_translations(self.lang)

File "/usr/lib/python3/dist-packages/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/lib/python3/dist-packages/odoo/addons/base/models/ir_translation.py", line 805, in load_module_terms

tools.trans_load(self._cr, base_trans_file, lang, verbose=False, module_name=module_name, context=context)

File "/usr/lib/python3/dist-packages/odoo/tools/translate.py", line 1013, in trans_load

result = trans_load_data(cr, fileobj, fileformat, lang, verbose=verbose, module_name=module_name, context=context)

File "/usr/lib/python3/dist-packages/odoo/tools/translate.py", line 1157, in trans_load_data

irt_cursor.finish()

File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_translation.py", line 156, in finish

""" % (self._model_table, self._table))

File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 148, in wrapper

return f(self, *args, **kwargs)

File "/usr/lib/python3/dist-packages/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.