Odoo Help

Welcome!

This community 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.

5

remove announcement bar

By
wilson andres osorio muñoz
on 1/19/14, 7:35 PM 4,672 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.

1
Francisco Luz
On 7/2/14, 12:29 PM

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;
        }
    });
};

 

1
Wolfgang Taferner
On 1/20/14, 2:38 AM

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.

-1
Lithin T
On 7/2/14, 4:30 PM

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); 

Hacking into core code is a terrible idea.

Francisco Luz
on 7/2/14, 7:20 PM

You should always implement changes in custom modules.

Francisco Luz
on 7/2/14, 7:21 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/19/14, 7:35 PM
Seen: 4672 times
Last updated: 3/16/15, 8:10 AM