From 7a519520f2d7758296dc8764e77bcf8d1d222107 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 30 Jul 2018 12:22:16 +0200 Subject: [PATCH] [FIX] mail: use -U+FEFF instead of U+2011 for negative numbers Just like cb2a3afa7e010d1cd7a01c64f5c3ac58b6fd76d2, U+2011 may not be rendered correctly with all fonts. --- addons/mail/models/mail_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index cc07b375204..37215829bb8 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -70,7 +70,7 @@ def format_amount(env, amount, currency): lang = env['res.lang']._lang_get(env.context.get('lang') or 'en_US') formatted_amount = lang.format(fmt, currency.round(amount), grouping=True, monetary=True)\ - .replace(r' ', u'\N{NO-BREAK SPACE}').replace(r'-', u'\u2011') + .replace(r' ', u'\N{NO-BREAK SPACE}').replace(r'-', u'-\N{ZERO WIDTH NO-BREAK SPACE}') pre = post = u'' if currency.position == 'before':