[FIX] docuseal_signing: strip trailing slash from Docuseal API URL

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 17:10:57 +01:00
parent 593db7c31e
commit de53394c0c

View File

@@ -37,7 +37,9 @@ class DocusealTemplate(models.Model):
self.ensure_one()
IrParam = self.env["ir.config_parameter"].sudo()
api_token = IrParam.get_param("docuseal.api_token")
api_url = IrParam.get_param("docuseal.api_url", "https://sign.elabore.coop")
api_url = IrParam.get_param(
"docuseal.api_url", "https://sign.elabore.coop"
).rstrip("/")
url = f"{api_url}/api/templates/{self.template_id}"
req = urllib.request.Request(url, headers={"X-Auth-Token": api_token})
@@ -105,7 +107,9 @@ class DocusealTemplate(models.Model):
self.ensure_one()
IrParam = self.env["ir.config_parameter"].sudo()
api_token = IrParam.get_param("docuseal.api_token")
api_url = IrParam.get_param("docuseal.api_url", "https://sign.elabore.coop")
api_url = IrParam.get_param(
"docuseal.api_url", "https://sign.elabore.coop"
).rstrip("/")
results = []
for partner in partners: