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] [FIX] l10n_it_fatturapa_import_zip correctly imports all XML files in zip #3959

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

rlucia
Copy link
Contributor

@rlucia rlucia commented Feb 14, 2024

Corregge #3958

Con queste modifiche, dopo l'estrazione del contenuto dello zip file:

  • non vengono presi in considerazione tutti i file estratti
  • vengono presi in considerazione solo XML validi
  • vengono presi in considerazione solo file con estensione .p7m (in questa fase mi è sembrato un overkill verificarne anche la correttezza formale)
  • viene fatto uno scan di tutti i file anche nelle subdirectory
  • aggiunto logging che informa quali file vengono importati e cosa viene scartato

E' stato modificato il file xml_import.zip utilizzato dai test, che ora contiene anche un file non xml e non p7m, ed alcuni xml in una subdirectory.

Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

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

Grazie della PR!
Ho fatto solo revisione del codice.

Puoi aggiungere un test? Così si evitano regressioni.

Puoi verificare come mai falliscono i test esistenti? Finché falliscono la PR non si può mergiare.

Per il messaggio del commit, puoi seguire https://github.com/OCA/odoo-community.org/blob/8afdb5a5ebfd3314e2fc836c9b9f644468ee044e/website/Contribution/CONTRIBUTING.rst#L1114?

@rlucia rlucia force-pushed the fix/scan-files-in-subdirs branch 2 times, most recently from 34fbd57 to ff3ad32 Compare February 14, 2024 11:59
@rlucia
Copy link
Contributor Author

rlucia commented Feb 14, 2024

@SirAionTech grazie. Appena ho un attimo verifico le commit messages rules. Nel frattempo comunque edito il commento della PR.

Btw, il test falliva perché non avevo considerato l'import di file p7m.

Rifatto anche il file xml_import.zip che contiene un file che dovrebbe essere escluso e spostati alcuni file in subdirectory. Cosi' il test effettivamente verifica il codice modificato.

@SirAionTech
Copy link
Contributor

@SirAionTech grazie. Appena ho un attimo verifico le commit messages rules. Nel frattempo comunque edito il commento della PR.

Btw, il test falliva perché non avevo considerato l'import di file p7m.

Rifatto anche il file xml_import.zip che contiene un file che dovrebbe essere escluso e spostati alcuni file in subdirectory. Cosi' il test effettivamente verifica il codice modificato.

Perfetto grazie, quando vuoi che aggiorni la revisione puoi richiederlo direttamente in Github seguendo https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review
image

l10n_it_fatturapa_import_zip/models/attachment.py Outdated Show resolved Hide resolved
l10n_it_fatturapa_import_zip/models/attachment.py Outdated Show resolved Hide resolved
l10n_it_fatturapa_import_zip/models/attachment.py Outdated Show resolved Hide resolved
@rlucia rlucia force-pushed the fix/scan-files-in-subdirs branch from 3f8aaa7 to 5acb1ed Compare February 15, 2024 06:51
@rlucia rlucia force-pushed the fix/scan-files-in-subdirs branch from 5acb1ed to c08bd91 Compare February 15, 2024 06:55
@rlucia rlucia requested a review from SirAionTech February 15, 2024 07:02
Copy link
Contributor

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Contributor

@TheMule71 TheMule71 left a comment

Choose a reason for hiding this comment

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

LGTM

@TheMule71
Copy link
Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3959-by-TheMule71-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 54cbae1 into OCA:16.0 Feb 23, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at f5167ec. Thanks a lot for contributing to OCA. ❤️

@rlucia rlucia deleted the fix/scan-files-in-subdirs branch May 17, 2024 17:20
@TheMule71 TheMule71 mentioned this pull request Nov 15, 2024
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

l10n_it_fatturapa_import_zip: il meccanismo di importazione è incompleto e poco stabile
5 participants