diff options
| author | Olivier Laurent <olt@tinyerp.com> | 2008-10-14 13:40:21 +0200 |
|---|---|---|
| committer | Olivier Laurent <olt@tinyerp.com> | 2008-10-14 13:40:21 +0200 |
| commit | 9f2c18bdca48475f4e4b3670b40a12a8a0fe4a01 (patch) | |
| tree | 79f02844cc99ce9ef568363d9cc6fff38d223f5f /addons | |
| parent | f62b19d648e8104094498854b29425aaadf1d671 (diff) | |
| parent | 7b0b0d091abbeb09c9ab1004fadabea8691834a4 (diff) | |
merge
bzr revid: olt@tinyerp.com-20081014114021-3xvh0h8zxeitlqwo
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/report/central_journal.py | 2 | ||||
| -rw-r--r-- | addons/account/report/central_journal.rml | 244 |
2 files changed, 167 insertions, 79 deletions
diff --git a/addons/account/report/central_journal.py b/addons/account/report/central_journal.py index c4dab8fc600..7b595a311a7 100644 --- a/addons/account/report/central_journal.py +++ b/addons/account/report/central_journal.py @@ -55,7 +55,7 @@ class journal_print(report_sxw.rml_parse): def _sum_credit(self, period_id, journal_id): self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id)) return self.cr.fetchone()[0] or 0.0 -report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml',parser=journal_print) +report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml',parser=journal_print, header=False) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/central_journal.rml b/addons/account/report/central_journal.rml index 359465379d2..ade1659de58 100644 --- a/addons/account/report/central_journal.rml +++ b/addons/account/report/central_journal.rml @@ -3,6 +3,30 @@ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20"> <pageTemplate id="first"> <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/> + <header> + <pageGraphics> + <setFont name="Helvetica-Bold" size="9"/> + + + <!--COL 1--> + <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString> + <drawRightString x="20cm" y="28.1cm">Central Journal-[[ company.currency_id.name ]]</drawRightString> + + <!-- Header --> + + + <setFont name="Helvetica" size="9"/> + <drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString> + <drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString> + <!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>--> + + + <lineMode width="0.7"/> + <lines>1cm 27.7cm 20cm 27.7cm</lines> + <setFont name="Helvetica" size="8"/> + + </pageGraphics> + </header> </pageTemplate> </template> <stylesheet> @@ -10,44 +34,62 @@ <blockAlignment value="LEFT"/> <blockValign value="TOP"/> </blockTableStyle> - <blockTableStyle id="Table1"> + <blockTableStyle id="Table_header_Content"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + </blockTableStyle> + <blockTableStyle id="Table_Sub_Header_Content"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/> - <blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/> - <blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> </blockTableStyle> - <blockTableStyle id="Table2"> + <blockTableStyle id="Table_Subheader_Content_detail"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="GRID" colorName="black"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/> + <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> + <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> </blockTableStyle> - <blockTableStyle id="Table3"> + <blockTableStyle id="Table_Account_detail_Title"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> </blockTableStyle> - <blockTableStyle id="Table4"> + <blockTableStyle id="Table_Final_Total"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="GRID" colorName="black"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> + </blockTableStyle> + <blockTableStyle id="Table_Journal_Line_Content"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> </blockTableStyle> <initialize> <paraStyle name="all" alignment="justify"/> </initialize> - <paraStyle name="P1" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P4" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P5" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P6" fontName="Times-Roman" alignment="CENTER"/> - <paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14"/> - <paraStyle name="P8" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P9" fontName="Times-Roman" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P10" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P11" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P12" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P13" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> - <paraStyle name="P14" fontName="Times-Roman"/> <paraStyle name="Standard" fontName="Times-Roman"/> <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> @@ -55,104 +97,150 @@ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> <paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/> <paraStyle name="Index" fontName="Times-Roman"/> + <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="Footer" fontName="Times-Roman"/> + <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> + <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> + <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> + <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> </stylesheet> + <images/> <story> - <para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para> - <blockTable colWidths="147.0,184.0,151.0" repeatRows="1" style="Table1"> + <!--blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content"> <tr> <td> - <para style="P1"> - <font color="white"> </font> - </para> - </td> - <td> - <para style="P2">Central Journal</para> + <para style="terp_header">[[ company.name ]]</para> </td> <td> - <para style="P3"> + <para style="terp_header"> <font color="white"> </font> </para> </td> - </tr> - <tr> - <td> - <para style="P4">[[ company.name ]]</para> - </td> <td> - <para style="P3">[[ o.journal_id.code ]] [[ o.journal_id.name ]]</para> - </td> - <td> - <para style="P5">Currency: [[ company.currency_id.name ]]</para> + <para style="terp_header">Central Journal-[[ company.currency_id.name ]]</para> </td> </tr> - </blockTable> - <para style="Standard"> + </blockTable--> + <para style="terp_default_8"> <font color="white"> </font> </para> - <para style="P6">Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para> - <para style="P7"> + <para style="terp_default_8"> <font color="white"> </font> </para> - <blockTable colWidths="158.0,103.0,103.0,58.0,60.0" repeatRows="1" style="Table2"> + <para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para> + <blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content"> <tr> <td> - <para style="P8">Account number</para> - </td> - <td> - <para style="P8">Account name</para> + <para style="terp_tblheader_General_Centre">Journal Code</para> </td> <td> - <para style="P8">Currency</para> + <para style="terp_tblheader_General_Centre">Journal Name</para> </td> <td> - <para style="P8">Debit</para> - </td> - <td> - <para style="P8">Credit</para> + <para style="terp_tblheader_General_Centre">Printing Date</para> </td> </tr> </blockTable> - <blockTable colWidths="158.0,104.0,103.0,58.0,60.0" style="Table3"> + <blockTable colWidths="180.0,180.0,180.0" style="Table_Subheader_Content_detail"> <tr> <td> - <para style="P9"><font face="Times-Roman">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</font>[[ line['code'] ]]</para> - </td> - <td> - <para style="P10">[[ line['name'] ]]</para> + <para style="terp_tblheader_General_Centre">[[ o.journal_id.code or '' ]]</para> </td> <td> - <para style="P10"> - <font color="white"> </font> - </para> + <para style="terp_tblheader_General_Centre">[[ o.journal_id.name ]]</para> </td> <td> - <para style="P11">[[ line['debit'] and '%.2f' % line['debit'] or '' ]]</para> - </td> - <td> - <para style="P11">[[ line['credit'] and '%.2f' % line['credit'] or '' ]]</para> + <para style="terp_tblheader_General_Centre">[[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]</para> </td> </tr> </blockTable> - <blockTable colWidths="364.0,58.0,60.0" style="Table4"> + <para style="terp_default_8"> + <font color="white"> </font> + </para> + <para style="terp_default_8"> + <font color="white"> </font> + </para> + <blockTable colWidths="83.0,272.0,95.0,89.0" style="Table_Account_detail_Title" repeatRows="1"> <tr> <td> - <para style="P12">TOTAL:</para> + <para style="terp_tblheader_Details_Centre">Account Num.</para> + </td> + <td> + <para style="terp_tblheader_Details">Account Name</para> </td> <td> - <para style="P13">[[ '%.2f' % sum_debit(o.period_id.id, o.journal_id.id) ]]</para> + <para style="terp_tblheader_Details_Right">Debit</para> </td> <td> - <para style="P13">[[ '%.2f' % sum_credit(o.period_id.id, o.journal_id.id) ]]</para> + <para style="terp_tblheader_Details_Right">Credit</para> </td> </tr> - </blockTable> - <para style="Standard"> - <font color="white"> </font> - </para> - <pageBreak/> - <para style="P14"> + + <tr> + <td> + <blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Final_Total"> + <tr> + <td> + <para style="terp_default_Bold_9">Total:</para> + </td> + <td> + <para style="terp_default_Bold_9"> + <font color="white"> </font> + </para> + </td> + <td> + <para style="terp_default_Bold_9_Right">[[ '%.2f' % sum_debit(o.period_id.id, o.journal_id.id) ]]</para> + </td> + <td> + <para style="terp_default_Bold_9_Right">[[ '%.2f' % sum_credit(o.period_id.id, o.journal_id.id) ]]</para> + </td> + </tr> + </blockTable> + </td> + </tr> + + <tr> + <td> + <para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para> + <blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Journal_Line_Content"> + <tr> + <td> + <para style="terp_default_9">[[ line['code'] ]]</para> + </td> + <td> + <para style="terp_default_9">[[ line['name'] ]]</para> + </td> + <td> + <para style="terp_default_Right_9">[[ formatLang(line['debit']) and '%.2f' % line['debit'] or '0.00' ]]</para> + </td> + <td> + <para style="terp_default_Right_9">[[ formatLang(line['credit']) and '%.2f' % line['credit'] or '0.00' ]]</para> + </td> + </tr> + </blockTable> + </td> + </tr> + </blockTable> + <para style="terp_default_8"> <font color="white"> </font> </para> </story> </document> - |
