[FIX] base: field monetary lose context of t-lang
In monetary field refactoring (3407fb70e4) there was a small issue that
made context lost so the language use to render the field could be
different from the one to render the view.
For example: if the user has english, and print a report using the lang
of a partner in language spanish, the report would use spanish to format
number for all fields but monetary (which would use english).
opw-708197
This commit is contained in:
@@ -340,7 +340,7 @@ class MonetaryConverter(models.AbstractModel):
|
||||
if not options.get('display_currency') and field.type == 'monetary' and field.currency_field:
|
||||
options['display_currency'] = record[field.currency_field]
|
||||
|
||||
return self.value_to_html(record[field_name], options)
|
||||
return super(MonetaryConverter, self).record_to_html(record, field_name, options)
|
||||
|
||||
TIMEDELTA_UNITS = (
|
||||
('year', 3600 * 24 * 365),
|
||||
|
||||
Reference in New Issue
Block a user