mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_disable_export_group: Differenciate between the XLSX export and the standard export
This commit is contained in:
@@ -37,6 +37,14 @@ odoo.define("web_disable_export_group", function(require) {
|
||||
if (
|
||||
!session.is_superuser &&
|
||||
action &&
|
||||
action.startsWith("export_xlsx") &&
|
||||
!session.group_xlsx_export_data
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
!session.is_superuser &&
|
||||
action &&
|
||||
!action.startsWith("export_xlsx") &&
|
||||
action.startsWith("export_") &&
|
||||
!session.group_export_data
|
||||
) {
|
||||
|
||||
@@ -67,5 +67,34 @@ odoo.define("web_disable_export_group.tour", function(require) {
|
||||
},
|
||||
]
|
||||
);
|
||||
tour.register(
|
||||
"export_tour_demo_xlsx",
|
||||
{
|
||||
test: true,
|
||||
url:
|
||||
"/web#model=ir.ui.view&view_type=list&cids=&action=base.action_ui_view",
|
||||
},
|
||||
[
|
||||
{
|
||||
content: "Check if 'Export all' button exists",
|
||||
trigger: ".o_list_buttons:has(.o_list_export_xlsx)",
|
||||
},
|
||||
{
|
||||
content: "Select all records",
|
||||
trigger: ".custom-control-input:first",
|
||||
},
|
||||
{
|
||||
content: "Open actions",
|
||||
trigger: ".o_dropdown_toggler_btn",
|
||||
},
|
||||
{
|
||||
content: "Check if Export button does not exist",
|
||||
trigger:
|
||||
'.o_control_panel div.o_dropdown_menu a:first:not(:contains("' +
|
||||
_t("Export") +
|
||||
'"))',
|
||||
},
|
||||
]
|
||||
);
|
||||
return {};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user