From 33d46b8c99089f9221deeb6b2579ad01143780ac Mon Sep 17 00:00:00 2001 From: "Nasreddin Boulif (bon)" Date: Tue, 26 Sep 2023 17:07:26 +0200 Subject: [PATCH] [FIX] digest: redirect to digest form page Step to reproduce: - Install `digest` module and configure mail setup - Sent the digest mail - Go to inbox and open mail - Click on the link of `Choose the metrics you care about` Issue: Redirected to main menu on Odoo. Cause: The link is broken because we escape `&` twice: escaped directly in the URL string, then with `Markup`. Solution: Use only Markup to escape `&`. opw-3470958 closes odoo/odoo#137352 X-original-commit: e3e6d1970df192e6629b9a9caf2d6cf36c64723b Signed-off-by: Nasreddin Boulif (bon) --- addons/digest/models/digest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/digest/models/digest.py b/addons/digest/models/digest.py index 8772b3c581a..8d90376d9b4 100644 --- a/addons/digest/models/digest.py +++ b/addons/digest/models/digest.py @@ -351,7 +351,7 @@ class Digest(models.Model): if user.has_group('base.group_erp_manager'): preferences.append(Markup('

%s
%s

') % ( _('Want to customize this email?'), - f'/web#view_type=form&model={self._name}&id={self.id:d}', + f'/web#view_type=form&model={self._name}&id={self.id:d}', _('Choose the metrics you care about') ))