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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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.
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.
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;
}
});
};
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.
You should always implement changes in custom modules.