mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_disable_export_group: black, isort, prettier
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Copyright 2018 Tecnativa - David Vidal
|
||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
|
||||
odoo.define("web_disable_export_group", function(require) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
var core = require("web.core");
|
||||
var Sidebar = require("web.Sidebar");
|
||||
@@ -10,10 +10,15 @@ odoo.define("web_disable_export_group", function(require) {
|
||||
var _t = core._t;
|
||||
|
||||
Sidebar.include({
|
||||
_addItems: function (sectionCode, items) {
|
||||
_addItems: function(sectionCode, items) {
|
||||
var _items = items;
|
||||
if (!session.is_superuser && sectionCode === 'other' && items.length && !session.group_export_data) {
|
||||
_items = _.reject(_items, {label:_t("Export")});
|
||||
if (
|
||||
!session.is_superuser &&
|
||||
sectionCode === "other" &&
|
||||
items.length &&
|
||||
!session.group_export_data
|
||||
) {
|
||||
_items = _.reject(_items, {label: _t("Export")});
|
||||
}
|
||||
this._super(sectionCode, _items);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user