2018

HOW-TO: 6.0 Web client customization

There are some restrictions in changing the OpenERP web client, as far as you can discover in the "Open ERP Public License", and one cannot freely take out logos and names.

Shanghai Elico Limited - 上海寰享网络科技有限公司, Eric Caudal
 Restrictions * All names, links and logos of Tiny, Open ERP and Axelor must be kept as in the original distribution without any changes in any software screens, especially in start-up page and the software header, even if the application source code has been changed or updated or code has been added. * All distributions of the software must keep source code with OEPL. * All integrations to any other software must keep source code with OEPL. Now, when you read this license, you understand as well that there is no prohibition in adding logos, texts or new color to this startup web page. How-to add a logo to the new openobject web client 6.0, in Ubuntu 10.04 environment:

1. Modification of screen.css to add the logo style

(/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/static/css/screen.css) Add the following code: #company_logo2 { padding: 0 0; width: 95%; } p#cmp_logo2 { float: left; width: 110px; height:65px; margin: 0 0 0 0; padding: 0 0 0 0; background: url(../images/logo-bg.png) repeat-y; line-height: (your_logo_height)px; } Change your_logo_height by the convenient figure. Unfortunately, you can play on the width but not really on the height which is fixed by the other elements...

2. Modification of menu.css

(/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/static/css/menu.css) Change the following code to move the shortcuts bar a little bit and make space for the logo: #shortcuts { position: absolute; float: left; margin: 0; padding: 6px 5px; top: 35px; left: 183px; width: 100%; height: 30px; line-height: 1.2; background: url(../images/top-bg-b.gif) scroll repeat-x top transparent; } By the following one: #shortcuts { position: absolute; float: left; margin: 0; padding: 6px 5px; top: 35px; left: 304px; width: 100%; height: 30px; line-height: 1.2; background: url(../images/top-bg-b.gif) scroll repeat-x top transparent; } (here my logo is around 110 px wide + some margin)

3. modify the header.mako to place the new logo

(/usr/local/lib/python2.6/dist-packages/openobject_web-5.2dev-py2.6.egg/openerp-web/addons/openerp/controllers/templates/header.mako) After the following code: Add the following one:

Elico Corporation

4. Add a png file

(/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/static/images/company_logo.png) (110 px wide x 65px high in my case) Et voilà! you can have a look at the final result here:[ilink url="http://demo6.elico-corp.net/"]http://demo6.elico-corp.net/[/ilink] PS: you dont need to restart the openobject-web server each time you change the css files but yes you have to do it when changing the mako file...