This question has been flagged
3 Replies
8298 Views

Anyone knows how to remove the announcement bar in OPENERP 7.0, I am going crazy with this message, plase help me!!!

Thanks so much.

Avatar
Discard
Best Answer

Hi Wilson Andres,

You can easily hide it in customizing CSS of your own module or any module in your instance (you can add it most of the times in this file: static/src/css/base.css)

 .openerp .announcement_bar {
    display: none;
    visibility: hidden;
 }

One little and effective customization for not going crazy ;-)

Good luck and have fun.

Avatar
Discard
Best Answer

Aside from Taferner's CSS solution, which by the way is a great valid solution, I am aware of another 2 ways of doing it.

1st Option: Override the html:

* Create a new module
* In your module's manifest ( __openerp__.py ). Add the following:

'qweb': [
        "static/src/xml/*.xml",
 ],

* Create a xml file at static/src/xml/web_custom.xml
* Inside web_custom.xml. Add the following:

<?xml version="1.0" encoding="UTF-8"?>
<templates>
    <t t-extend="WebClient">
        <t t-jquery="td.announcement_bar" t-operation="replace">
          <div class="announcement_bar">
            <span>You have conquered this spot.</span>
          </div>
        </t>
    </t>
</templates>

 

2nd Option: Override the Javascript:

* Create a new module
* In your module's manifest ( __openerp__.py ). Add the following:

'js': [
        "static/src/js/*.js",
],

* Create a js file at static/src/js/announcement_bar.js
* Inside announcement_bar.js. Add the following:

openerp.MY_MODULE_NAME = function(instance) {
    instance.web.WebClient.include({
        // Remove annoucement_bar.
        show_annoucement_bar: function() {
            return;
        }
    });
};

 

Avatar
Discard
Best Answer

Another crazy and easy way to remove the announcement bar is
comment the line

openerp_announcement(session); 

in addons/mail/static/src/js/mail.js

Sample:

openerp_announcement(session);  

to

//openerp_announcement(session); 

Avatar
Discard

Hacking into core code is a terrible idea.

You should always implement changes in custom modules.