Odoo Help


5 Answers

Guewen Baconnier Switzerland

--Guewen Baconnier--

| 8 7 10
Lausanne, Switzerland
--Guewen Baconnier--

Guewen works at Camptocamp as an Odoo developer since 2010. He is the lead developer of the Odoo Connector framework and the Magento Connector. He is a delegate member of the OCA, a committer and an active contributor to the OCA projects.


Guewen Baconnier Switzerland
2/21/13, 5:40 AM

The OpenERP files (server, addons, web) should never be edited. You should always prefer to do your modifications in a custom addon.

You can do this change by creating a custom addon and replacing the part of the UI you don't want.

Usual addons are installed on a database basis. Removing the Manage database link is global to an installation, so you'll need to start your server with the name of your module in the --load option.

./openerp-server --load=web,your_module

Your module should also be auto-installable, use the key auto_install in the __openerp__.py of your module:

'auto_install': True,

To remove the Manage database, you'll need to create a file static/src/xml/base.xml:

    <!-- Templates modified at the web start, before loading of a database. -->

    <!-- Remove the Manage database link, but keep the Powered by OpenERP-->
    <t t-extend="Login">
        <t t-jquery="div.oe_login_footer" t-operation="replace">
            <div class="oe_login_footer">
                <a href="http://www.openerp.com" target="_blank">Powered by <span>OpenERP</span></a>


Then you need to load the file in __openerp__.py:

'qweb' : [

You can edit the logo or other elements interface too. You can refer to the file addons/web/static/src/xml/base.xml in openerp-web to see the base templates.

The templates use the QWeb syntax: QWeb documentation

Maxime Chambreuil Mexico
4/27/13, 3:06 PM

and there is a great project on Launchpad to host your new module: https://launchpad.net/web-addons

dengwei China
12/25/13, 11:54 PM

thx ,it help me great

exxor Germany
2/6/14, 8:49 AM

great answer, thanks for the help

Savoir-Faire Linux, Sandy Carter Canada
2/20/14, 4:07 PM

Should be this to avoid a change in the formatting.

    <t t-jquery="div.oe_login_footer" t-operation="replace">
      <div class="oe_login_footer">
        <a href="http://www.openerp.com" target="_blank">Powered by <span>OpenERP</span></a>
Camptocamp SA, Guewen Baconnier Switzerland
2/21/14, 5:45 AM

Thanks Sandy. Edited my answer.

Andrey Kolpakov Sweden
4/1/14, 12:17 PM

Guewen Baconnier's answer is work. But it only hide the link "Manage Databases". Functionality and API will be still active. And if your OpenERP is public someone can hack your database using this api. Especially if you did not change default password 'admin'.

For restricting access additionally to Guewen Baconnier's comment you should override default controller addons/web/controller/main.py (Controller Database). For that you should create controller package in your own module and create file <my_own_module>/controller/main.py with content:

from web import http
from openerp.addons.web.controllers.main import Database, db_list
openerpweb = http

class Database_restrict(Database):
    def create(self, req, fields):

        # check if it is not first installation - restrict!

        dblist = db_list(req)
        if len(dblist) > 0:
            raise Exception('Not allowed')

        return super(Database_restrict, self).create(req, fields)

    def duplicate(self, req, fields):
        raise Exception('Not allowed')

    def drop(self, req, fields):
        raise Exception('Not allowed')

    def backup(self, req, backup_db, backup_pwd, token):
        raise Exception('Not allowed')

    def restore(self, req, db_file, restore_pwd, new_db):
        raise Exception('Not allowed')

    def change_password(self, req, fields):
        raise Exception('Not allowed')

Then you should include controllers package in __init__.py of your module.

It overrides functions for database management and rase exception but allow you to create first database.

Atul Kumar jain India
8/13/14, 11:06 AM

Very nice , Working fine

Kelly Stuart United States
10/30/14, 12:30 AM

I like your approach! Added security is very important.


Daniel Reis Portugal

--Daniel Reis--
| 8 9 11
Linda-a-Velha, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt

Daniel Reis Portugal
2/21/13, 5:30 AM

There is a server option for that:

Security-related options:
  --no-database-list  disable the ability to return the list of databases

Try starting the server adding the option --no-database-list.

Mohammad Alhashash Egypt
2/21/13, 5:52 AM

In my updated 7.0 code, this option just removes the database selection box.

Wira Bakti Soenaryo Indonesia
2/21/13, 10:54 PM

To remove database list NOT "manage databases" can be from the openerp configuration file located at /etc/openerp/openerp-server.conf on list_db option.

thenon United Kingdom
4/4/13, 2:56 PM

With this option, clicking on the link does nothing anyway, so it works fine for security purposes.

Angela France
2/21/13, 5:06 AM

I have all details about this in 6.1.1, I guess it's similar in 7. Do searches in OpenERP 7.0-20130216-002451\Server\server\openerp\addons\web

For example, take a look in base.xml line 81, I'd say if you comment out stuff around there you'd get rid of "Manage database". You can also change the "openerp" link and text to put your own company.

The logos are in web\static\src\img

1 Comment
John Karr United States
12/7/13, 12:06 AM

The XML File is located at /addons/web/static/src/xml. This should definitely be configurable in the main conf file, requiring neither module nor hack.

Marek Toman Czech Republic
4/24/13, 5:46 AM

Usual addons are installed on a database basis. Removing the Manage database link is global to an installation, so you'll need to start your server with the name of your module in the --load option.

Tried it without --load option and it works. Just added module in setings page and installed it. Works like charm.

Ask a Question
Keep Informed
7 follower(s)
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