[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) <bon@odoo.com>
This commit is contained in:
Nasreddin Boulif (bon)
2023-10-03 20:17:48 +00:00
parent 9a70545913
commit 33d46b8c99
+1 -1
View File
@@ -351,7 +351,7 @@ class Digest(models.Model):
if user.has_group('base.group_erp_manager'):
preferences.append(Markup('<p>%s<br /><a href="%s" target="_blank" style="color:#875A7B; font-weight: bold;">%s</a></p>') % (
_('Want to customize this email?'),
f'/web#view_type=form&amp;model={self._name}&amp;id={self.id:d}',
f'/web#view_type=form&model={self._name}&id={self.id:d}',
_('Choose the metrics you care about')
))