Skip to content
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

Open
wants to merge 31 commits into
base: 17.0
Choose a base branch
from

Conversation

SodexisTeam
Copy link
Member

No description provided.

astirpe and others added 30 commits August 22, 2024 13:56
[IMP] Automatically add root and admin to group

[FIX] Website in manifest
Currently translated at 100.0% (3 of 3 strings)

Translation: web-12.0/web-12.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_disable_export_group/zh_CN/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-12.0/web-12.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_disable_export_group/hr/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-12.0/web-12.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_disable_export_group/es/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-12.0/web-12.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_disable_export_group/pt/
The previous adaptation was not correct due to:

- The old XML-ID is already missing on post stage.
- There's now only one group, so no need of all the imply + group
  assignation stuff like in previous version.
Currently translated at 100.0% (4 of 4 strings)

Translation: web-15.0/web-15.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_disable_export_group/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-16.0/web-16.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_disable_export_group/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-16.0/web-16.0-web_disable_export_group
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_disable_export_group/it/
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work. Tested and looking good. Some comments:

  • Fix the tours

this.isExportXlsEnable = await this.userService.hasGroup(
patch(exportAllItem, {
async isDisplayed(env) {
const ExportEnable = super.isDisplayed(...arguments);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The super function is async, so you must call it with await

Suggested change
const ExportEnable = super.isDisplayed(...arguments);
const ExportEnable = await super.isDisplayed(...arguments);

Comment on lines +18 to +21
if (ExportXlsEnable) {
return ExportXlsEnable;
}
return ExportEnable;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same:

Suggested change
if (ExportXlsEnable) {
return ExportXlsEnable;
}
return ExportEnable;
return ExportXlsEnable || ExportEnable ;

On the picky side, the usual convention is that local variables are declared with lower_case (snake_case) (e.g: export_xls_enable) and PascalCase is usually used for classes

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.