Search code examples
odooodoo-8openerp-8odoo-9

HIde delete button from export data form view in odoo


I want to hide delete button from Export Data form view in odoo. Button that i want to hide also highlighted in attached image.

enter image description here

I'll be very thankful...


Solution

  • You will need to override Odoo's QWeb templates for such customizations.

    Create a xml under mymodule/static/src/xml (e.g. your_customization.xml) with following content:

    <template>
        <t t-extend="Exists.ExportList">
            <t t-jquery="button[id|='delete_export_list']" t-operation="replace" />
        </t>
    </template>
    

    And then don't forget to call that file in your manifest (__openerp__.py) like

    {
        # other things like author, name, data
        'qweb': ['static/src/xml/your_customization.xml'],
    }