From f8f4ea3cdcaec951ce22ad6ccc22c79642d1a7af Mon Sep 17 00:00:00 2001 From: "Ignacio J. Ortega" Date: Thu, 3 Oct 2024 10:16:56 +0200 Subject: [PATCH] [IMP] remove website_sale dependency, and fix url generation to make web.base.url the default if website is not installed --- payment_redsys/__manifest__.py | 2 +- payment_redsys/models/payment_provider.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/payment_redsys/__manifest__.py b/payment_redsys/__manifest__.py index c101cef3b51..8d2f777820f 100644 --- a/payment_redsys/__manifest__.py +++ b/payment_redsys/__manifest__.py @@ -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", diff --git a/payment_redsys/models/payment_provider.py b/payment_redsys/models/payment_provider.py index b5345ac8b30..37f513052ae 100644 --- a/payment_redsys/models/payment_provider.py +++ b/payment_redsys/models/payment_provider.py @@ -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 if domain and domain != "localhost": # Check domain scheme as Odoo does in `website._get_http_domain()` parsed_url = urls.url_parse(domain)