Skip to content

Commit

Permalink
[IMP] remove website_sale dependency, and fix url generation to make …
Browse files Browse the repository at this point in the history
…web.base.url the default if website is not installed
  • Loading branch information
IJOL committed Oct 16, 2024
1 parent 47912fe commit f8f4ea3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion payment_redsys/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": "16.0.1.0.1",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-spain",
"depends": ["payment", "website_sale"],
"depends": ["payment"],
"external_dependencies": {"python": ["pycryptodome"]},
"data": [
"views/payment_provider.xml",
Expand Down
2 changes: 1 addition & 1 deletion payment_redsys/models/payment_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _get_website_url(self):
or self.env.context.get("website_id")
and self.env["website"].browse(self.env.context["website_id"])
)
domain = website and website.domain or ""
domain = website and website.domain

Check warning on line 108 in payment_redsys/models/payment_provider.py

View check run for this annotation

Codecov / codecov/patch

payment_redsys/models/payment_provider.py#L108

Added line #L108 was not covered by tests
if domain and domain != "localhost":
# Check domain scheme as Odoo does in `website._get_http_domain()`
parsed_url = urls.url_parse(domain)
Expand Down

0 comments on commit f8f4ea3

Please sign in to comment.