Starting openerp server with --no-database-list not working with new web

Bug #1094179 reported by Carlos Fonseca - 3RP on 2012-12-28
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Web Team
openerp-web (CentOS)
New
Undecided
Unassigned
openerp-web (Ubuntu)
Undecided
Unassigned

Bug Description

SO: Ubuntu 10.12

Openerp v7.0 (Build 1061)

Starting openerp server with --no-database-list not working with new web

https://....//#menu_id=106&action=94

BUG:

Client Traceback (most recent call last):
  File "/home/openerp/source/web/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/home/openerp/source/web/addons/web/controllers/main.py", line 708, in get_list
    return db_list(req)
  File "/home/openerp/source/web/addons/web/controllers/main.py", line 87, in db_list
    dbs = proxy.list()
  File "/home/openerp/source/web/addons/web/session.py", line 28, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/home/openerp/source/web/addons/web/session.py", line 95, in send
    raise xmlrpclib.Fault('AccessDenied', str(e))

Server Access denied.

SOLUTION

Replace def db_list within total web/addons/web/controllers/main.py

def db_list(req):
    h = req.httprequest.environ['HTTP_HOST'].split(':')[0]
    d = h.split('.')[0]
    if openerp.tools.config['list_db']:
     proxy = req.session.proxy("db")
     dbs = proxy.list()
     r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
     dbs = [i for i in dbs if re.match(r, i)]
    else:
     dbs = [ d ]
    return dbs

summary: - Starting openerp server with --no-database-list not working with new web
+ [7.0] Starting openerp server with --no-database-list not working with
+ new web

The attachment "patch-main.py" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in openerp-web:
status: New → Confirmed
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Amit Parik (amit-parik) on 2013-01-01
Changed in openerp-web:
importance: Undecided → Medium
Kunal Chavda (kunal-chavda) wrote :

Steps to reproduce this bug:
Starting openerp server with --no-database-list > Now type your db name and try to login it gives above trace-back.

Thanks,
Kunal Chavda

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openerp-web (Ubuntu):
status: New → Confirmed
summary: - [7.0] Starting openerp server with --no-database-list not working with
- new web
+ Starting openerp server with --no-database-list not working with new web

Fixed in openerp-web in revision 3678.

Changed in openerp-web:
status: Confirmed → Fix Released
Changed in openerp-web (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers