Odoo Help


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.


Hide base module button with inheritance

Juan Vicente Pascual
on 5/5/16, 6:11 AM 295 views
Is there any options to remove or hide more, print and attachment buttons in a specific menu element views (tree and form view) , I tried in several ways, but i didn't find hide them.
I've try this, 

<script type="text/javascript">

$(window).ready(function() {




in the xml file of my custom module, and also have tried , in a js file.

I think that thoose buttons are loaded after the view is loaded.

How may i hide the buttons then?

Kind regards.


I've found a solution for my problem.

To hide more, print and attachment buttons, i've create a view named base.xml in my_module/static/src folder, with the next code

<?xml version="1.0" encoding="utf-8"?>


    <t t-extend="Sidebar">

        <t t-jquery="div.oe_form_dropdown_section" t-operation="replace">

            <t t-if="widget.session.active_id === 516"> 

                <div class="oe_form_dropdown_section"></div>


            <t t-if="widget.session.active_id !== 516">

                 ....... original base.xml div




where 516 is the id of view i want to hide buttons.

I think there has to be a way to avoid to set an id value, but right now this is working fine.

Kind Regards.

I can not modify the title of my question to add [SOLVED] in the title.

Juan Vicente Pascual
on 5/6/16, 6:53 AM

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)


Asked: 5/5/16, 6:11 AM
Seen: 295 times
Last updated: 5/6/16, 6:49 AM