Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
OperationalError: Unable to use a closed cursor -- Unable to create new database via interface v7 -- Potential solutions given
When trying to create a database from user interface it shows :
Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch return fn(*params) File "/opt/openerp/server/openerp/service/web_services.py", line 168, in exp_create_database _initialize_db(self, id, db_name, demo, lang, user_password) File "/opt/openerp/server/openerp/service/web_services.py", line 98, in _initialize_db cr.close() File "/opt/openerp/server/openerp/sql_db.py", line 160, in wrapper raise psycopg2.OperationalError(msg) OperationalError: Unable to use a closed cursor.
The sql connection is closed, but I don't know why.
Potential solution 1 :
After further researches, I found that to be able to create database from user interface, you should do the following configuration :
On openerp-server.conf, you should put on db_password : the password for the role attributed to the "openerp" user, it's that role that gives the openerp user the ability to create databases from user interface. if the two passwords does not match you won't be able to create databases from user interface.
In my case, I found that my openerp-server.conf contained : db_password : False, I changed it into the password of the role gived to openerp user ( createdb), I restarted the server but nothing changes, When trying to create database from user interface, same error occurs.
Potential Solution 2 :
I tried to create database from psql, by accessing postgres from shell, with openerp user, I tried : createdb db_name, the database is created, but I can't log in, I don't know how to attribute my database creation a administrator account, while performing createdb. the functionnal side of this potential solution2, is to be able to perform the same database creation process from user interface, on postgres.
Can anyone please, give me a hand on this 2 potential solutions ? I'm really struggling with this. Thanks.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/31/14, 10:04 AM|
|Seen: 1542 times|
|Last updated: 3/12/16, 2:45 PM|