skip to Main Content

I would like to remove "Export" in action menu in Odoo 14 Community Edition.

I want to remove it for all views at once if possible; otherwise, one by one for each required model or view would be fine.

Export action menu

I tried:

<xpath expr="//tree" position="attributes">
  <attribute name="export_xlsx">false</attribute>
</xpath>

in individual model. Doesn’t work.

Also tried overwriting the Sidebar in javascript. Doesn’t work.

2

Answers


  1. Odoo will only show the Export option if the user belongs to the Access to export feature group.

    To hide the export option, just remove the user from the list

    Overriding the Action menus (previously called Sidebar) or the list controller will make the export group obsolete

    Login or Signup to reply.
  2. Do it using this js code

    odoo.define('disable_export', function (require) {
    "use strict";
    
    const ListView = require('web.ListView');
    
    ListView.include({
      init: function (viewInfo, params) {
        this._super.apply(this, arguments);
        this.controllerParams.activeActions.export_xlsx = false;
      }
    })
    
    })
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search