Backbone.js 从列表视图的更多选项中删除共享、嵌入

Backbone.js 从列表视图的更多选项中删除共享、嵌入,backbone.js,openerp,odoo-8,openerp-7,openerp-8,Backbone.js,Openerp,Odoo 8,Openerp 7,Openerp 8,我正在尝试从列表视图中删除共享和嵌入。我正在使用模块web\u hide\u duplicate将其从表单视图中删除。它很好用。在列表视图中,它没有 *.js instance.web.ListView.include({ load_list: function(data) { this._super(data); if (this.sidebar == undefined) return; var no_share = _.rej

我正在尝试从
列表视图中删除
共享和嵌入
。我正在使用模块
web\u hide\u duplicate
将其从
表单视图中删除。它很好用。在列表视图中,它没有

*.js

 instance.web.ListView.include({

  load_list: function(data) {
      this._super(data);
      if (this.sidebar == undefined)
        return;
        var no_share = _.reject(this.sidebar.items.other, function (item) {
            return item.label === _t('Share');
            });

            this.sidebar.items.other = no_share;
        var no_embed = _.reject(this.sidebar.items.other, function (item) {
            return item.label === _t('Embed');
            });
            this.sidebar.items.other = no_embed;
      console.log('Tree view222',this.sidebar.items.other); // Here, only shows to record, Export and Delete. But in view all Options are listing.
  }

});
注意:

现在下拉视图看起来像

标签-->功能

  • 共享-->导出功能
  • 嵌入--->删除函数
  • 导出--->JS错误
  • 删除--->JS错误 我该怎么做

请发布错误。另外,您使用的是哪个版本的Odoo?请发布错误。另外,您使用的是哪个版本的Odoo?