Skip to content

Commit

Permalink
[FIX] improved date format in fiche de paie report
Browse files Browse the repository at this point in the history
  • Loading branch information
fka-odoo committed Jun 26, 2014
1 parent 390c811 commit d16c570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions addons/l10n_fr_hr_payroll/report/fiche_paye.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions openerp/report/report_sxw.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ def setLang(self, lang):
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
Expand Down

0 comments on commit d16c570

Please sign in to comment.