[IMP] hr_holiday: improve holiday report

bzr revid: ara@tinyerp.com-20120524123536-12qllmpfblgzi5c3
This commit is contained in:
Ashvin Rathod (OpenERP) 2012-05-24 18:05:36 +05:30
parent ce24cc113d
commit f79e8740b3
2 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,7 @@
</tr>
</blockTable>
<spacer length="1.0cm" />
<para style="title" t="1">Off-Days' Summary</para>
<para style="title" t="1">Leaves/Holidays Summary <xsl:value-of select="report/name" /></para>
<spacer length="0.5cm" />
<para style="normal-title" t="1">Analyze from <u><xsl:value-of select="report/from" /></u> to <u> <xsl:value-of select="report/to" /> </u> of the <u><xsl:value-of select="report/type" /></u> holidays. </para>
<spacer length="1.0cm" />

View File

@ -106,6 +106,10 @@ class report_custom(report_rml):
eom = som+datetime.timedelta(59)
day_diff=eom-som
name = ''
if len(data['form']['emp']) == 1:
name = 'of'+' '+obj_emp.read(cr, uid, data['form']['emp'][0], ['name'])['name']
if data['form']['holiday_type']!='both':
type=data['form']['holiday_type']
if data['form']['holiday_type']=='Confirmed':
@ -118,6 +122,7 @@ class report_custom(report_rml):
date_xml.append('<from>%s</from>\n'% (str(rml_obj.formatLang(som.strftime("%Y-%m-%d"),date=True))))
date_xml.append('<to>%s</to>\n' %(str(rml_obj.formatLang(eom.strftime("%Y-%m-%d"),date=True))))
date_xml.append('<type>%s</type>'%(type))
date_xml.append('<name>%s</name>'%(name))
# date_xml=[]
for l in range(0,len(legend)):