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

[15.0][ADD] l10n_jp_partner_zip_address #40

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

AungKoKoLin1997
Copy link
Contributor

Comment on lines 27 to 47
request_url = (
"http://zipcloud.ibsnet.co.jp/api/search?zipcode" "=%s" % self.zipcode
)
request = urllib.request.Request(request_url)
response_data = json.loads(
urllib.request.urlopen(request).read().decode("utf-8")
)
self.state_id = False
self.city = False
self.street = False
self.street2 = False
if response_data["status"] != 200:
self.zipcode = False
return {
"warning": {
"title": _("Error"),
"message": response_data["message"],
}
}
else:
address_data = response_data["results"]
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Can we split the connection part into a separate method with an exception handling?

Consider using requests instead of urllib.

Copy link
Sponsor Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Module name suggestion: l10n_jp_partner_postcode_address

Copy link
Sponsor Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

@AungKoKoLin1997 I've added a commit. Please review the changes and if OK, please add tests.

@yostashiro yostashiro changed the title [15.0][ADD] l10n_jp_partner_post_code_search [15.0][ADD] l10n_jp_partner_zip_address Feb 3, 2024
@kanda999
Copy link

kanda999 commented Feb 6, 2024

For some reason, the translation is not reflected.
2024-02-06_18h57_31

"Only digits are allowed" has been translated

@yostashiro
Copy link
Sponsor Member

For some reason, the translation is not reflected.

Fixed it. I had made a mistake with the translation file directory.

@yostashiro
Copy link
Sponsor Member

@AungKoKoLin1997 Can you please squash commits and push once you confirm the udpate.

@kanda999
Copy link

kanda999 commented Feb 7, 2024

I have confirmed that the translation has been applied.

@yostashiro
Copy link
Sponsor Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-40-by-yostashiro-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4da5151 into OCA:15.0 Feb 7, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

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