Hi Buddies,
Getting the following error while creating the Database. Can anyone help me to solve this?
Error Info:
2020-11-02 04: 29: 21,863 8657 INFO None odoo.service.db: Create database `test`.
2020-11-02 04: 29: 21,867 8657 ERROR None odoo.sql_db: bad query: b'CREATE DATABASE "test" ENCODING \ 'unicode \' TEMPLATE "template1" '
ERROR: CREATE DATABASE cannot run inside a transaction block
2020-11-02 04: 29: 21,868 8657 ERROR None odoo.http: CREATE DATABASE cannot run inside a transaction block
Traceback (most recent call last):
File "/home/trail/web11/dev/trail-web/odoo/odoo/http.py", line 115, in dispatch_rpc
result = dispatch (method, params)
File "/home/trail/web11/dev/trail-web/odoo/odoo/service/db.py", line 449, in dispatch
return g [exp_method_name] (* params)
File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-3>", line 2, in exp_create_database
File "/home/trail/web11/dev/trail-web/odoo/odoo/service/db.py", line 40, in if_db_mgt_enabled
return method (self, * args, ** kwargs)
File "/home/trail/web11/dev/trail-web/odoo/odoo/service/db.py", line 106, in exp_create_database
_create_empty_database (db_name)
File "/home/trail/web11/dev/trail-web/odoo/odoo/service/db.py", line 100, in _create_empty_database
cr.execute ("" "CREATE DATABASE"% s "ENCODING 'unicode' TEMPLATE"% s "" ""% (name, chosen_template))
File "/home/trail/web11/dev/trail-web/odoo/odoo/sql_db.py", line 155, in wrapper
return f (self, * args, ** kwargs)
File "/home/trail/web11/dev/trail-web/odoo/odoo/sql_db.py", line 232, in execute
res = self._obj.execute (query, params)
psycopg2.InternalError: CREATE DATABASE cannot run inside a transaction block
Thanks in Advance.