Skip to content

[17.0][FIX] currency_rate_update_xe: send User-Agent and raise on HTTP error#218

Open
shirashi3771 wants to merge 1 commit into
OCA:17.0from
APSL:17.0-mig-currency_rate_update_xe
Open

[17.0][FIX] currency_rate_update_xe: send User-Agent and raise on HTTP error#218
shirashi3771 wants to merge 1 commit into
OCA:17.0from
APSL:17.0-mig-currency_rate_update_xe

Conversation

@shirashi3771

@shirashi3771 shirashi3771 commented May 19, 2026

Copy link
Copy Markdown

@OCA-git-bot OCA-git-bot added mod:currency_rate_update_xe Module currency_rate_update_xe series:17.0 labels May 19, 2026
@shirashi3771 shirashi3771 force-pushed the 17.0-mig-currency_rate_update_xe branch from d4d4ba0 to 5f1643e Compare May 19, 2026 08:33

@cubells cubells left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

LGTM

Code review and test

@palomagrc93 palomagrc93 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@BernatObrador BernatObrador left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@pedrobaeza

Copy link
Copy Markdown
Member

Please put correct commit message and module name.

@peluko00 peluko00 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@miquelpascual miquelpascual left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM once you fix the commit and title

@shirashi3771 shirashi3771 changed the title [FIX] currency_rate_update_xent and raise on HTTP error [17.0][FIX] currency_rate_update_xe: send User-Agent and raise on HTTP error May 19, 2026
@shirashi3771 shirashi3771 force-pushed the 17.0-mig-currency_rate_update_xe branch from 5f1643e to 5d47152 Compare May 19, 2026 11:10
@shirashi3771

Copy link
Copy Markdown
Author

Now, it's possible to merge?
@mpascuall

@miquelpascual

Copy link
Copy Markdown
Contributor

Now, it's possible to merge? @mpascuall

It looks good now, but I don't have permission to merge it. @pedrobaeza could you help us with that please?

@pedrobaeza pedrobaeza added this to the 17.0 milestone May 19, 2026
"GET",
url,
timeout=10,
headers={"User-Agent": "Mozilla/5.0"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why faking the user agent?

# computes date_from = today - 1 day, producing one rate per day in
# the range — which is correct behaviour but makes this assertion
# depend on whether XE returns a rate for the past-day URL.
self.xe_provider.last_successful_run = self.today - relativedelta(days=1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of this, you can freeze the time for the tests.

@klodr klodr Jun 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@OCA-git-bot approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants