summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-05-10 16:05:10 +0200
committerNicolas Martinelli <nim@odoo.com>2016-05-10 16:05:27 +0200
commit34f09a0e69fccb4e9bdb53c02b2d9d69bcd8ca2c (patch)
tree13a51467b8d6fad7e38aa58f438d3e15d53c8620
parent9348416867c65556b2d0e415ee1b731f194f12b3 (diff)
[FIX] base: no-break space in qweb
A non-breaking space is used between the amount and the currency. However, if a space is used as a separator, there is a possibility that the amount will be split into several lines. opw-674535
-rw-r--r--openerp/addons/base/ir/ir_qweb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openerp/addons/base/ir/ir_qweb.py b/openerp/addons/base/ir/ir_qweb.py
index f012cc8b139..2f0e73c26e5 100644
--- a/openerp/addons/base/ir/ir_qweb.py
+++ b/openerp/addons/base/ir/ir_qweb.py
@@ -887,7 +887,7 @@ class MonetaryConverter(osv.AbstractModel):
lang = self.pool['res.lang']
formatted_amount = lang.format(cr, uid, [lang_code],
fmt, Currency.round(cr, uid, display_currency, from_amount),
- grouping=True, monetary=True)
+ grouping=True, monetary=True).replace(r' ', u'\N{NO-BREAK SPACE}')
pre = post = u''
if display_currency.position == 'before':
@@ -1049,7 +1049,7 @@ class QwebWidgetMonetary(osv.AbstractModel):
lang_code = qwebcontext.context.get('lang') or 'en_US'
formatted_amount = self.pool['res.lang'].format(
qwebcontext.cr, qwebcontext.uid, [lang_code], fmt, inner, grouping=True, monetary=True
- )
+ ).replace(r' ', u'\N{NO-BREAK SPACE}')
pre = post = u''
if display.position == 'before':
pre = u'{symbol}\N{NO-BREAK SPACE}'