Odoo Help


The server throws an exception instead of displaying "database does not exist"

on 10/18/13, 6:32 AM 1,591 views

Hello, I am using OpenERP 7 on ubuntu 12.04. I started the server with "list_db = False". It works fine : the menu list was changed by an input field. But when I write a name of database which does not exit, the server throws an exception instead of displaying a message : "database does not exit" for example. This is the text of the exception:

    Client Traceback (most recent call last): 

  File "/opt/openerp/web/addons/web/http.py", line 204, in dispatch  response["result"] = method(self, **self.params)  

     File "/opt/openerp/web/addons/web/controllers/main.py", line 867, in authenticate req.session.authenticate(db, login, password, env)   

    File "/opt/openerp/web/addons/web/session.py", line 115, in authenticate uid = self.proxy('common').authenticate(db, login, password, env)   

    File "/opt/openerp/web/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args)   File "/opt/openerp/web/addons/web/session.py", line 103, in send  raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

    Server Traceback (most recent call last):   

    File "/opt/openerp/web/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 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) 

      File "/opt/openerp/server/openerp/service/web_services.py", line 433, in dispatch return fn(*params)   File "/opt/openerp/server/openerp/service/web_services.py", line 444, in exp_authenticate  res_users = pooler.get_pool(db).get('res.users')   

    File "/opt/openerp/server/openerp/pooler.py", line 49, in get_pool return get_db_and_pool(db_name, force_demo, status, update_module)[1]  File "/opt/openerp/server/openerp/pooler.py", line 33, in get_db_and_pool  registry = RegistryManager.get(db_name, force_demo, status, update_module)   

    File "/opt/openerp/server/openerp/modules/registry.py", line 192, in get update_module)   File "/opt/openerp/server/openerp/modules/registry.py", line 208, in new
        registry = Registry(db_name)   

    File "/opt/openerp/server/openerp/modules/registry.py", line 76, in __init__  cr = self.db.cursor()   

    File "/opt/openerp/server/openerp/sql_db.py", line 484, in cursor  return Cursor(self._pool, self.dbname, serialized=serialized)   

    File "/opt/openerp/server/openerp/sql_db.py", line 182, in __init__  self._cnx = pool.borrow(dsn(dbname))  

     File "/opt/openerp/server/openerp/sql_db.py", line 377, in _locked   return fun(self, *args, **kwargs)   File "/opt/openerp/server/openerp/sql_db.py", line 440, in borrow result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)   

    File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async)

     OperationalError: FATAL:  database "db1" does not exist

no solution for this embarrassing bug ?????!!!!!!!!!?????!!!!!!!!

on 10/18/13, 12:03 PM

This is normal, you must write a database already created.!!!

on 10/19/13, 10:53 AM

salemou 3alaykom Borni, no no, the server must display a message "database does not exist" when the user enter a inexistent database name. It works fine on OpenERP 6 : see this : http://openerp-team.blogspot.com/2009/11/hiding-database-name-on-login.html

on 10/19/13, 11:03 AM
On 10/19/13, 9:31 PM

I have just located the cause of this bug . Please go to "web/addons/web/static/src/js/chrome.js: line 706 : you will see that the on_submit function has one " if " block to verify that the field of the database is not empty. The solution is to add a second " if " block to verify if the name entered is in the list of databases before calling the do_login(db, login, password) function Unfortunately I don't know JavaScript programming :( Someone helps me

always no response in this forum :/

on 10/20/13, 7:58 PM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/18/13, 6:32 AM
Seen: 1591 times
Last updated: 3/16/15, 8:10 AM