From d6486e17d2c8401b12865aca85ed62a41c9cc7f8 Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Tue, 14 Sep 2010 18:11:00 +0530 Subject: [PATCH] [IMP/ADD]: Header in hr_holidays xsl report with saterate template for xsl landscape rport. bzr revid: rch_open_erp-20100914124100-0ifc15gr11yswtmv --- .../hr_holidays/report/holidays_summary.xsl | 28 +++---------- .../report/holidays_summary_report.py | 13 +++++- .../hr_holidays/report/hr_custom_default.xsl | 40 +++++++++++++++++++ addons/hr_holidays/report/hr_custom_rml.xsl | 37 +++++++++++++++++ 4 files changed, 94 insertions(+), 24 deletions(-) create mode 100644 addons/hr_holidays/report/hr_custom_default.xsl create mode 100644 addons/hr_holidays/report/hr_custom_rml.xsl diff --git a/addons/hr_holidays/report/holidays_summary.xsl b/addons/hr_holidays/report/holidays_summary.xsl index 793c557c262..67bb2a58769 100644 --- a/addons/hr_holidays/report/holidays_summary.xsl +++ b/addons/hr_holidays/report/holidays_summary.xsl @@ -3,19 +3,14 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + + - - - - - + @@ -131,13 +126,6 @@ - - - - - - - @@ -151,24 +139,20 @@ - company - Company Name: - print-date - Printing time: - + Off-Days' Summary Analyze from to of the holidays. - + 0.7cm,5.0cm diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py index 851defe7e73..323f23404d4 100644 --- a/addons/hr_holidays/report/holidays_summary_report.py +++ b/addons/hr_holidays/report/holidays_summary_report.py @@ -27,7 +27,7 @@ from report.interface import report_rml from report.interface import toxml import pooler - +import time def lengthmonth(year, month): if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))): @@ -234,14 +234,23 @@ class report_custom(report_rml): dept_done=1 emp_xml += emp_create_xml(self, cr, uid, 0, holiday_type, row_id, item['id'], item['name'], som, eom) row_id = row_id +1 + + header_xml = ''' +
+ %s + %s +
+ ''' % (time.strftime('%m/%d/%Y %H:%M'),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name) + # Computing the xml xml=''' %s %s %s + %s - ''' % (months_xml,date_xml, emp_xml) + ''' % (header_xml,months_xml,date_xml, emp_xml) return xml diff --git a/addons/hr_holidays/report/hr_custom_default.xsl b/addons/hr_holidays/report/hr_custom_default.xsl new file mode 100644 index 00000000000..39e71d6d53e --- /dev/null +++ b/addons/hr_holidays/report/hr_custom_default.xsl @@ -0,0 +1,40 @@ + + + + + + + + + + + + + / + + 1.3cm 19.3cm 28.5cm 19.3cm + + + + + + + + + + + + / + + 1.3cm 19.3cm 28.5cm 19.3cm + + + + + + + + + + + diff --git a/addons/hr_holidays/report/hr_custom_rml.xsl b/addons/hr_holidays/report/hr_custom_rml.xsl new file mode 100644 index 00000000000..64a4894613a --- /dev/null +++ b/addons/hr_holidays/report/hr_custom_rml.xsl @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + +