(self)
return base_url or ""
For a single website setting the domain website name is not accesible
        for the user, by default is localhost so the system get domain from
        system parameters instead of domain of website record.
For a single website setting the domain website name is not accesible
        for the user, by default is localhost so the system get domain from
        system parameters instead of domain of website record.
For a single website setting the domain website name is not accesible for the user by default is localhost so the system get domain from system parameters instead of domain of website record .
def _get_website_url(self):
        """
        For a single website setting the domain website name is not accesible
        for the user, by default is localhost so the system get domain from
        system parameters instead of domain of website record.
        """
        if config["test_enable"]:
            return self.env["ir.config_parameter"].sudo().get_param("web.base.url")

        domain = http.request.website.domain
        if domain and domain != "localhost":
            base_url = "{}://{}".format(
                http.request.httprequest.environ["wsgi.url_scheme"],
                http.request.website.domain,
            )
        else:
            base_url = self.env["ir.config_parameter"].sudo().get_param("web.base.url")
        return base_url or ""
def _get_website_url ( self ) : if config [ "test_enable" ] : return self . env [ "ir.config_parameter" ] . sudo ( ) . get_param ( "web.base.url" ) domain = http . request . website . domain if domain and domain != "localhost" : base_url = "{}://{}" . format ( http . request . httprequest . environ [ "wsgi.url_scheme" ] , http . request . website . domain , ) else : base_url = self . env [ "ir.config_parameter" ] . sudo ( ) . get_param ( "web.base.url" ) return base_url or ""