[FIX] improved date format in fiche de paie report
This commit is contained in:
parent
390c811db8
commit
d16c57035d
|
@ -29,6 +29,7 @@ class fiche_paye_parser(report_sxw.rml_parse):
|
|||
def __init__(self, cr, uid, name, context):
|
||||
super(fiche_paye_parser, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'lang': "fr_FR",
|
||||
'get_payslip_lines': self.get_payslip_lines,
|
||||
'get_total_by_rule_category': self.get_total_by_rule_category,
|
||||
'get_employer_line': self.get_employer_line,
|
||||
|
|
|
@ -239,8 +239,10 @@ class rml_parse(object):
|
|||
def _get_lang_dict(self):
|
||||
pool_lang = self.pool.get('res.lang')
|
||||
lang = self.localcontext.get('lang', 'en_US') or 'en_US'
|
||||
lang_ids = pool_lang.search(self.cr,self.uid,[('code','=',lang)])[0]
|
||||
lang_obj = pool_lang.browse(self.cr,self.uid,lang_ids)
|
||||
lang_ids = pool_lang.search(self.cr,self.uid,[('code','=',lang)])
|
||||
if not lang_ids:
|
||||
lang_ids = pool_lang.search(self.cr,self.uid,[('code','=','en_US')])
|
||||
lang_obj = pool_lang.browse(self.cr,self.uid,lang_ids[0])
|
||||
self.lang_dict.update({'lang_obj':lang_obj,'date_format':lang_obj.date_format,'time_format':lang_obj.time_format})
|
||||
self.default_lang[lang] = self.lang_dict.copy()
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue