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

[16.0] excel_import_export: template cannot be found if it is created by duplicating another template #2738

Open
rinaldifirdaus opened this issue Oct 20, 2023 · 0 comments
Labels

Comments

@rinaldifirdaus
Copy link

Module

excel_import_export

Describe the bug

context:

  • An existing template already has a file uploaded in the "File Content" field.
  • Export Action of the existing template has been added by click on "ADD EXPORT ACTION"

When creating a new template by duplicating the existing template:
・The new template cannot be found in the Action button of the specified model.
・Even after changing the new template name and uploading a new file in the "File Content" field, the template does not appear in the Action.
I believe this issue may be due to the "REMOVE EXPORT ACTION" remaining unchanged after duplicating the existing template. It seems that the load_xlsx_template function might be storing the file name from the duplicated template. As a result, users need to click on "REMOVE EXPORT ACTION" and then click the "ADD EXPORT ACTION" button again to make the template visible.

To Reproduce

Affected versions: 16.0
Steps to reproduce the behavior:

  1. Go to Settings > Technical > On XLSX template menu and create the first template by clicking the "New" button.
  2. Set the template name, upload a file to the "File Content" field, configure the sheet, and on the Export tab, click "ADD EXPORT ACTION" (the button changes to "REMOVE EXPORT ACTION").
  3. On the first template, click on "Action" > "Duplicate."
  4. The second template is created with the same name, the same file content's file, and "REMOVE EXPORT ACTION" remains the same.
  5. Change the template name, upload a new file, configure the sheet, and then save.
  6. Check the action button of the specified model (e.g., the picking form's action button), and the new template will not be displayed

Expected behavior

  • When duplicating another template, the new record's export action button should change back to "ADD EXPORT ACTION" so that users are aware that they need to click this button to display the template.
  • Additionally, it might be better to add "(Copy)" to the template's name so that the user is aware that the duplication was successful.

@qrtl

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

No branches or pull requests

1 participant