odoo.define('web.DuplicateVisibility',function(require){"use strict";varcore=require('web.core');varSidebar=require('web.Sidebar');varFormView=require('web.FormView');var_t=core._t;varDuplicateVisibility=FormView.include({/** * Instantiate and render the sidebar if a sidebar is requested * Sets this.sidebar * @param {jQuery} [$node] a jQuery node where the sidebar should be inserted * $node may be undefined, in which case the FormView inserts the sidebar in a * div of its template **/render_sidebar:function($node){varres=this._super.apply(this,arguments);if(this.sidebar){if(!this.is_action_enabled('duplicate')&&this.sidebar.items.hasOwnProperty('other')){this.sidebar.items.other=this.sidebar.items.other.filter(function(item){returnitem.label!==_t("Duplicate");});this.sidebar.redraw();}}returnres;},});});