add web_disable_export

this module removes the 'Export' option from the 'More' menu in the list view except for the admin user.
Nhomar,

 

You are right but the ‘sponsoring’ customer only wanted to pay a couple of hours to disable the export and hence we implemented this. 

 

Regards,

Luc

 

 <http://www.noviat.com/> www.noviat.com

Rusatiralaan 1, 1083 Brussel

+32 2 808 86 38

 



 

From: Nhomar Hernández [Vauxoo] [mailto:notifications@github.com] 
Sent: zaterdag 20 december 2014 23:27
To: OCA/web
Cc: luc-demeyer
Subject: Re: [web] add web_disable_export (#63)

 

In web_disable_export/static/src/js/disable_export.js <https://github.com/OCA/web/pull/63#discussion-diff-22144347> :

> +#    You should have received a copy of the GNU Affero General Public License
> +#    along with this program. If not, see < <http://www.gnu.org/licenses/> http://www.gnu.org/licenses/>.
> +#
> +##############################################################################
> +*/
> +
> +openerp.web_disable_export = function(instance) {
> +
> +    var _t = instance.web._t;
> +    var SUPERUSER_ID = 1;
> +
> +    instance.web.Sidebar.include({
> +
> +        add_items: function(section_code, items) {
> +            // allow Export for admin user
> +            if (this.session.uid == SUPERUSER_ID) {

It should be great if it is checked by ACL and not only by SUPERUSER_ID, don't you think?

—
Reply to this email directly or view it on GitHub <https://github.com/OCA/web/pull/63/files#r22144347> .  <https://github.com/notifications/beacon/AHWZQVV_q7AT_l_Hx4BATBvKk-GZ94Vbks5nZe85gaJpZM4DK7oX.gif>