[IMP] hr_attendance:In Monthly Attendance Report moved the string from xsl to .py in order to translate it

bzr revid: mtr@mtr-20110630122641-0y4fxl4b9bqgh1qs
This commit is contained in:
mtr 2011-06-30 17:56:41 +05:30
parent e86e10063f
commit dfaa4fdfd5
2 changed files with 13 additions and 4 deletions

View File

@ -105,7 +105,7 @@ class report_custom(report_rml):
<company>%s</company>
</header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
first_date = str(month)
som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S')
eom = som + timedelta(int(dy)-1)
@ -177,10 +177,11 @@ class report_custom(report_rml):
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
<report>
%s
<title>%s</title>
%s
%s
</report>
''' % (header_xml,'\n'.join(user_xml),date_xml)
''' % (header_xml,_('Attendances By Month'),'\n'.join(user_xml),date_xml)
return xml
report_custom('report.hr.attendance.bymonth', 'hr.employee', '', 'addons/hr_attendance/report/bymonth.xsl')

View File

@ -12,6 +12,7 @@
<xsl:template name="stylesheet">
<paraStyle name="title" fontName="Helvetica-Bold" fontSize="15.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="name" fontName="Helvetica" textColor="green" fontSize="7"/>
<paraStyle name="normal" fontName="Helvetica" fontSize="6"/>
@ -29,7 +30,7 @@
<xsl:template name="story">
<spacer length="1cm" />
<para style="terp_header_Centre" t="1">Attendances By Month</para>
<xsl:apply-templates select="report/title"/>
<spacer length="1cm" />
<blockTable>
<xsl:attribute name="style">week</xsl:attribute>
@ -53,7 +54,14 @@
<xsl:apply-templates select="report/user"/>
</blockTable>
</xsl:template>
<xsl:template match="title">
<para style="title">
<xsl:value-of select="."/>
</para>
<spacer length="1cm"/>
</xsl:template>
<xsl:template match="user">
<!-- <tr></tr>-->
<tr>