odoo.define('module.ControlPanel', function (require) {
    'use strict';
    var ControlPanel = require('web.ControlPanel');
    /* Below function is mainly used for hide field from project export section*/
    ControlPanel.include({
        _update_search_view: function(searchview, is_hidden) {
            this._super.apply(this, arguments);
            if(searchview){
                this._rpc({
                        model: 'project.project',
                        method: 'get_fields_to_ignore_in_export_in_project',
                }).then(function (result) {
                    for(var i=0;i<result.length;i++){
                        searchview.$buttons.find('option[data-name="' + result[i] + '"]').hide();
                    }
                    })
            }
            },
        });
});