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

[12.0][FIX] l10n_nl_xaf_auditfile_export: avoid character / in filename #250

Merged

Conversation

astirpe
Copy link
Member

@astirpe astirpe commented Jan 2, 2020

When the auditfile name contains a / character, for example My Company XYZ/11, the export fails with the following error:

  File "/opt/odoo/custom_addons/l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py", line 139, in button_generate

    with open(auditfile, 'w+') as tmphandle:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmps5yzgrqz/My Company XYZ/11.xaf'

This PR replaces the / character with a blank.

Copy link
Member

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

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

your original change looks good to me, but what about the failing tests?

@astirpe astirpe force-pushed the 12_fix_l10n_nl_xaf_auditfile_export branch from a40dc59 to 5f97650 Compare July 29, 2020 06:35
@astirpe
Copy link
Member Author

astirpe commented Jul 29, 2020

I just removed the patch on the tests and they do not fail anymore 🥳

Copy link
Contributor

@NL66278 NL66278 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). 🤖

@hbrunn
Copy link
Member

hbrunn commented Jul 29, 2020

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 611a1bc into OCA:12.0 Jul 29, 2020
@OCA-git-bot
Copy link
Contributor

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

@astirpe astirpe deleted the 12_fix_l10n_nl_xaf_auditfile_export branch July 29, 2020 10:06
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.

None yet

4 participants