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

[14.0][ADD] currency_rate_update_nbu #8

Open
wants to merge 16 commits into
base: 14.0
Choose a base branch
from

Conversation

GarazdCreation
Copy link

No description provided.

"category": "Accounting & Finance",
"summary": "Allows to download currency exchange rates from "
"National Bank of Ukraine",
"author": "Garazd Creation," "Odoo Community Association (OCA),",
Copy link
Contributor

Choose a reason for hiding this comment

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

" " is not needed here

Copy link
Contributor

Choose a reason for hiding this comment

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

As well as coma in ,"

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this file? Also, I would guess if you do want to auto-create the provider, it needs to be noupdate

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Please look into the precommit issues and also squash all the changes into one commit

@alexey-pelykh alexey-pelykh changed the title [ADD] currency_rate_update_nbu [14.0][ADD] currency_rate_update_nbu Oct 13, 2022
@alexey-pelykh
Copy link
Contributor

Also, please add the readme components

@GarazdCreation
Copy link
Author

Thank you, Alexey. I will make changes and commit.

return super()._get_supported_currencies()
# List of currencies obrained from:
# https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json
return [
Copy link
Member

Choose a reason for hiding this comment

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

do not use hardcoded list, do a dynamic call to nbu service and parse json properly

:return: dict
"""
content = defaultdict(dict)
url = "https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json"
Copy link
Member

Choose a reason for hiding this comment

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

make url configurable, suppose "ir.config_parameter" would be good

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, Iryna, for your propositions. They were implemented.

…tion/oca-l10n-ukraine into 14.0-currency_rate_update_nbu
[REF] currency_rate_update_nbu: fix manifest checks result; rename method "_process_request" to "_nbu_process_request"

[IMP] currency_rate_update_nbu: add README.rst; add ir.config_parameter with api url; improve update logic

[REF] currency_rate_update_nbu: change README.rst

[14.0][IMP] currency_rate_update_nbu: add and configure setup

[IMP] currency_rate_update_nbu: add README.rst; add ir.config_parameter with api url; improve update logic

[FIX] currency_rate_update_nbu: fix pre-commit errors

[IMP] oca-l10n-ukraine: add setup.py

[FIX] currency_rate_update_nbu: configure setup

[14.0][FIX] .pre-commit-config.yaml: change URL to "https://github.com/PyCQA/flake8"

[IMP] currency_rate_update_nbu: add files to "readme" folder; add "currency" to oca_dependencies.txt

[FIX] currency_rate_update_nbu: fix pylint error E7901(rst-syntax-error)

[REF] currency_rate_update_nbu: change param in method "_nbu_get_rate" call
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.

3 participants