-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] web disable export group: Migration to 17.0 #2925
base: 17.0
Are you sure you want to change the base?
Changes from 1 commit
79f7aa4
86086ff
02b19bd
84d4164
4a08c47
39a1a97
c2d138f
eed8493
9289133
1a30736
89de596
6555ce5
ebd63d0
331107e
6192d74
faa8858
981f50e
c1fc34c
7b90569
cc57ce5
5d33b02
2c13b96
5cab520
149416f
a5c096e
fbb9d17
ac85c71
95b1b41
fced56d
72ec86f
d051024
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,8 @@ Contributors | |
- Víctor Martínez | ||
- David Vidal | ||
|
||
- SodexisTeam [email protected] | ||
|
||
Maintainers | ||
----------- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
from . import ir_http | ||
from . import models |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
- Alexandre Díaz | ||
- Víctor Martínez | ||
- David Vidal | ||
- SodexisTeam <[email protected]> |
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,20 +1,23 @@ | ||||||||||||
/** @odoo-module **/ | ||||||||||||
/* Copyright 2018 Tecnativa - David Vidal | ||||||||||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ | ||||||||||||
import {ListController} from "@web/views/list/list_controller"; | ||||||||||||
import {onWillStart} from "@odoo/owl"; | ||||||||||||
import {archParseBoolean} from "@web/views/utils"; | ||||||||||||
import {exportAllItem} from "@web/views/list/export_all/export_all"; | ||||||||||||
import {patch} from "@web/core/utils/patch"; | ||||||||||||
|
||||||||||||
patch(ListController.prototype, "disable_export_group", { | ||||||||||||
setup() { | ||||||||||||
this._super(...arguments); | ||||||||||||
onWillStart(async () => { | ||||||||||||
this.isExportEnable = await this.userService.hasGroup( | ||||||||||||
"base.group_allow_export" | ||||||||||||
); | ||||||||||||
this.isExportXlsEnable = await this.userService.hasGroup( | ||||||||||||
patch(exportAllItem, { | ||||||||||||
async isDisplayed(env) { | ||||||||||||
const ExportEnable = super.isDisplayed(...arguments); | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||
const ExportXlsEnable = | ||||||||||||
env.config.viewType === "list" && | ||||||||||||
!env.model.root.selection.length && | ||||||||||||
(await env.model.user.hasGroup( | ||||||||||||
"web_disable_export_group.group_export_xlsx_data" | ||||||||||||
); | ||||||||||||
}); | ||||||||||||
)) && | ||||||||||||
archParseBoolean(env.config.viewArch.getAttribute("export_xlsx"), true); | ||||||||||||
if (ExportXlsEnable) { | ||||||||||||
return ExportXlsEnable; | ||||||||||||
} | ||||||||||||
return ExportEnable; | ||||||||||||
Comment on lines
+18
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the same:
Suggested change
On the picky side, the usual convention is that local variables are declared with lower_case (snake_case) (e.g: |
||||||||||||
}, | ||||||||||||
}); |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the filename to
export_all.esm.js