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.
How to remove "Manage Databases" [Closed]
The Question has been closedby
As my subject, how do we remove the "Manage Databases" link on the login screen? Currently using openerp Version 7.0-20130221-002146 And also can we edit the login screen interface? For example editing the logo image. Thank you..
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
Your module should also be auto-installable, use the key
auto_install in the
__openerp__.py of your module:
To remove the
Manage database, you'll need to create a file
<templates> <!-- 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> </div> </t> </t> </templates>
Then you need to load the file in
'qweb' : [ "static/src/xml/base.xml", ],
You can edit the logo or other elements interface too.
You can refer to the file
openerp-web to see the base templates.
The templates use the QWeb syntax: QWeb documentation
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): @openerpweb.jsonrequest 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) @openerpweb.jsonrequest def duplicate(self, req, fields): raise Exception('Not allowed') @openerpweb.jsonrequest def drop(self, req, fields): raise Exception('Not allowed') @openerpweb.httprequest def backup(self, req, backup_db, backup_pwd, token): raise Exception('Not allowed') @openerpweb.httprequest def restore(self, req, db_file, restore_pwd, new_db): raise Exception('Not allowed') @openerpweb.jsonrequest 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.
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
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.
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: 2/21/13, 4:41 AM|
|Seen: 41708 times|
|Last updated: 9/23/16, 10:01 AM|