[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
This commit is contained in:
@@ -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}'
|
||||
|
||||
Reference in New Issue
Block a user