[FIX] res_lang : if value of thousands_sep is not present in language,method will give error- 'moentary' name is not defined
bzr revid: dsh@tinyerp.com-20100331102836-zbc26i80v4p3q4iv
This commit is contained in:
parent
29aff8f992
commit
8e15fd52b3
|
@ -62,7 +62,7 @@ class lang(osv.osv):
|
|||
]
|
||||
|
||||
@tools.cache(skiparg=3)
|
||||
def _lang_data_get(self, cr, uid, lang_id):
|
||||
def _lang_data_get(self, cr, uid, lang_id, monetary=False):
|
||||
conv = localeconv()
|
||||
lang_obj=self.browse(cr,uid,lang_id)
|
||||
thousands_sep = lang_obj.thousands_sep or conv[monetary and 'mon_thousands_sep' or 'thousands_sep']
|
||||
|
@ -120,7 +120,7 @@ class lang(osv.osv):
|
|||
if percent[0] != '%':
|
||||
raise ValueError("format() must be given exactly one %char format specifier")
|
||||
|
||||
lang_grouping, thousands_sep, decimal_point = self._lang_data_get(cr, uid, ids[0])
|
||||
lang_grouping, thousands_sep, decimal_point = self._lang_data_get(cr, uid, ids[0], monetary)
|
||||
|
||||
formatted = percent % value
|
||||
# floats and decimal ints need special action!
|
||||
|
|
Loading…
Reference in New Issue