Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when install odoo12 (github master branch code) #25611

Closed
hillbun opened this issue Jul 5, 2018 · 3 comments
Closed

error when install odoo12 (github master branch code) #25611

hillbun opened this issue Jul 5, 2018 · 3 comments

Comments

@hillbun
Copy link

hillbun commented Jul 5, 2018

Impacted versions: odoo12 (github master branch code)

Steps to reproduce:

when install odoo12 select language not English, it show errors like:

Database creation error: Wrong value for base.language.install.lang: 'en_GB'

error logs 馃憤

2018-07-05 03:01:41,052 1967 INFO odoo12_cn_demo odoo.addons.base.models.ir_translation: module base: loading translation file (en_GB) for language en_GB
2018-07-05 03:01:41,052 1967 INFO odoo12_cn_demo odoo.tools.translate: loading /root/odoo/odoo/addons/base/i18n/en_GB.po
2018-07-05 03:01:42,324 1967 ERROR odoo12_cn_demo 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 AS ti\n WHERE NOT EXISTS(SELECT 1 FROM ONLY ir_translation AS irt WHERE \n irt.lang = ti.lang\n AND irt.type = ti.type\n AND irt.name = ti.name\n AND (\n (ti.type = 'model' AND ti.res_id = irt.res_id AND ti.name IN ('ir.ui.view,arch_db', 'ir.actions.actions,help', 'ir.actions.act_window,help', 'ir.actions.act_window_close,help', 'ir.actions.act_url,help', 'ir.actions.server,help', 'ir.actions.client,help', 'ir.actions.report,help', 'ir.cron,help') AND irt.src = ti.src)\n OR (ti.type = 'model' AND ti.res_id = irt.res_id AND ti.name NOT IN ('ir.ui.view,arch_db', 'ir.actions.actions,help', 'ir.actions.act_window,help', 'ir.actions.act_window_close,help', 'ir.actions.act_url,help', 'ir.actions.server,help', 'ir.actions.client,help', 'ir.actions.report,help', 'ir.cron,help'))\n OR (ti.type = 'view' AND (irt.res_id IS NULL OR ti.res_id = irt.res_id) AND irt.src = ti.src)\n OR (ti.type = 'field')\n OR (ti.type = 'help')\n OR (ti.type NOT IN ('model', 'view', 'field', 'help') AND irt.src = ti.src)\n )\n )\n ON CONFLICT DO NOTHING;\n "
ERROR: syntax error at or near "ON"
LINE 17: ON CONFLICT DO NOTHING;
^

2018-07-05 03:01:42,326 1967 WARNING odoo12_cn_demo odoo.modules.loading: Transient module states were reset
2018-07-05 03:01:42,328 1967 ERROR odoo12_cn_demo odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/root/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/root/odoo/odoo/modules/loading.py", line 309, in load_modules
report=report, models_to_check=models_to_check)
File "/root/odoo/odoo/modules/loading.py", line 180, in load_module_graph
module.with_context(overwrite=overwrite)._update_translations()
File "/root/odoo/odoo/addons/base/models/ir_module.py", line 857, in _update_translations
self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
File "/root/odoo/odoo/addons/base/models/ir_translation.py", line 736, in load_module_terms
tools.trans_load(self._cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
File "/root/odoo/odoo/tools/translate.py", line 1014, in trans_load
result = trans_load_data(cr, fileobj, fileformat, lang, verbose=verbose, module_name=module_name, context=context)
File "/root/odoo/odoo/tools/translate.py", line 1146, in trans_load_data
irt_cursor.finish()
File "/root/odoo/odoo/addons/base/models/ir_translation.py", line 167, in finish
(tuple(src_relevant_fields), tuple(src_relevant_fields)))
File "/root/odoo/odoo/sql_db.py", line 156, in wrapper
return f(self, *args, **kwargs)
File "/root/odoo/odoo/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near "ON"
LINE 17: ON CONFLICT DO NOTHING;
^

2018-07-05 03:01:42,346 1967 ERROR odoo12_cn_demo odoo.service.db: CREATE DATABASE failed:
Traceback (most recent call last):
File "/root/odoo/odoo/service/db.py", line 62, in _initialize_db
registry = odoo.modules.registry.Registry.new(db_name, demo, None, update_module=True)
File "/root/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/root/odoo/odoo/modules/loading.py", line 309, in load_modules
report=report, models_to_check=models_to_check)
File "/root/odoo/odoo/modules/loading.py", line 180, in load_module_graph
module.with_context(overwrite=overwrite)._update_translations()
File "/root/odoo/odoo/addons/base/models/ir_module.py", line 857, in _update_translations
self.env['ir.translation'].load_module_terms(mod_names, filter_lang)
File "/root/odoo/odoo/addons/base/models/ir_translation.py", line 736, in load_module_terms
tools.trans_load(self._cr, trans_file, lang, verbose=False, module_name=module_name, context=context)
File "/root/odoo/odoo/tools/translate.py", line 1014, in trans_load
result = trans_load_data(cr, fileobj, fileformat, lang, verbose=verbose, module_name=module_name, context=context)
File "/root/odoo/odoo/tools/translate.py", line 1146, in trans_load_data
irt_cursor.finish()
File "/root/odoo/odoo/addons/base/models/ir_translation.py", line 167, in finish
(tuple(src_relevant_fields), tuple(src_relevant_fields)))
File "/root/odoo/odoo/sql_db.py", line 156, in wrapper
return f(self, *args, **kwargs)
File "/root/odoo/odoo/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near "ON"
LINE 17: ON CONFLICT DO NOTHING;
^

2018-07-05 03:01:42,354 1967 INFO odoo12_cn_demo odoo.modules.loading: loading 1 modules...
2018-07-05 03:01:42,366 1967 INFO odoo12_cn_demo odoo.modules.loading: 1 modules loaded in 0.01s, 0 queries
2018-07-05 03:01:42,392 1967 WARNING odoo12_cn_demo odoo.modules.loading: Transient module states were reset
2018-07-05 03:01:42,392 1967 ERROR odoo12_cn_demo odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/root/odoo/odoo/modules/registry.py", line 60, in new
return cls.registries[db_name]
File "/root/odoo/odoo/tools/func.py", line 68, in wrapper
return func(self, *args, **kwargs)
File "/root/odoo/odoo/tools/lru.py", line 44, in getitem
a = self.d[obj].me
KeyError: 'odoo12_cn_demo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/root/odoo/odoo/modules/loading.py", line 318, in load_modules
tools.load_language(cr, lang)
File "/root/odoo/odoo/tools/translate.py", line 1205, in load_language
installer = env['base.language.install'].create({'lang': lang})
File "/root/odoo/odoo/models.py", line 3339, in create
record = self._create(store_vals)
File "/root/odoo/odoo/models.py", line 3384, in _create
column_val = field.convert_to_column(val, self, vals)
File "/root/odoo/odoo/fields.py", line 1825, in convert_to_column
value = self.convert_to_cache(value, record)
File "/root/odoo/odoo/fields.py", line 1837, in convert_to_cache
raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for base.language.install.lang: 'en_GB'
2018-07-05 03:01:42,400 1967 ERROR odoo12_cn_demo odoo.http: Wrong value for base.language.install.lang: 'en_GB'
Traceback (most recent call last):
File "/root/odoo/odoo/modules/registry.py", line 60, in new
return cls.registries[db_name]
File "/root/odoo/odoo/tools/func.py", line 68, in wrapper
return func(self, *args, **kwargs)
File "/root/odoo/odoo/tools/lru.py", line 44, in getitem
a = self.d[obj].me
KeyError: 'odoo12_cn_demo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/odoo/odoo/http.py", line 118, in dispatch_rpc
result = dispatch(method, params)
File "/root/odoo/odoo/service/common.py", line 57, in dispatch
return gexp_method_name
File "/root/odoo/odoo/service/common.py", line 29, in exp_authenticate
res_users = odoo.registry(db)['res.users']
File "/root/odoo/odoo/init.py", line 76, in registry
return modules.registry.Registry(database_name)
File "/root/odoo/odoo/modules/registry.py", line 62, in new
return cls.new(db_name)
File "/root/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/root/odoo/odoo/modules/loading.py", line 318, in load_modules
tools.load_language(cr, lang)
File "/root/odoo/odoo/tools/translate.py", line 1205, in load_language
installer = env['base.language.install'].create({'lang': lang})
File "/root/odoo/odoo/models.py", line 3339, in create
record = self._create(store_vals)
File "/root/odoo/odoo/models.py", line 3384, in _create
column_val = field.convert_to_column(val, self, vals)
File "/root/odoo/odoo/fields.py", line 1825, in convert_to_column
value = self.convert_to_cache(value, record)
File "/root/odoo/odoo/fields.py", line 1837, in convert_to_cache
raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for base.language.install.lang: 'en_GB'

Current behavior:

Expected behavior:

Video/Screenshot link (optional):

@hillbun
Copy link
Author

hillbun commented Jul 5, 2018

pppp

@Elkasitu
Copy link
Contributor

Elkasitu commented Jul 5, 2018

This means that PostgreSQL doesn't recognize the ON CONFLICT statement which was introduced in PostgreSQL 9.5, this means that you have a PostgreSQL version < 9.5, you need to upgrade your postgres version to at least 9.5

Closing this as it's not a bug with Odoo standard, in the future please use the forums for asking questions.

@Elkasitu Elkasitu closed this as completed Jul 5, 2018
@Yenthe666
Copy link
Collaborator

And on a sidenote: the master version (upcoming v12) is still actively being developed and big changes land every week. Only use it for testing purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants