[IMP] : imrpove the header and add the balace column in general_journal report

bzr revid: sbh@tinyerp.com-20100715113456-5qh8712ti83jd4yx
This commit is contained in:
sbh (Open ERP) 2010-07-15 17:04:56 +05:30
parent d35ab4d704
commit c61922eaff
3 changed files with 90 additions and 36 deletions

View File

@ -237,7 +237,7 @@
<td><para style="terp_tblheader_General_Centre">Chat Account</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
<td><para style="terp_tblheader_General_Centre">Filters By <font>[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">Filters By <font color="white">[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font><font>[[get_filter(data)]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">Entries Sorted By</para></td>
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
</tr>
@ -277,7 +277,7 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="50.0,62.0,58.0,62.0,174.0,57.0,61.0,40.0" style="Table1" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<blockTable colWidths="50.0,72.0,58.0,62.0,174.0,57.0,61.0,40.0" style="Table1" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="P10a">Date</para></td>
<td><para style="P10">Voucher No</para></td>

View File

@ -48,7 +48,8 @@ class journal_print(report_sxw.rml_parse, common_report_header):
'get_start_period': self.get_start_period,
'get_end_period': self.get_end_period,
'get_sortby': self._get_sortby,
'sum_currency_amount_account': self._sum_currency_amount_account,
'sum_currency_amount_account': self._sum_currency_amount_account,
'get_filter': self._get_filter,
})
def set_context(self, objects, data, ids, report_type=None): # Improve move to common default?

View File

@ -106,6 +106,38 @@
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,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"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
</blockTableStyle>
<blockTableStyle id="Table_Sub_Header_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -142,7 +174,14 @@
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="8,0" stop="8,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Table_Company_Name">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Journal_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -186,9 +225,6 @@
<images/>
<story>
<para style="terp_default_8">[[ repeatIn( periods(objects), 'o') ]]</para>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
@ -209,45 +245,55 @@
</td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="60.0,60.0,60.0,60.0,59.0,59.0,59.0,59.0,59.0" style="Table_Sub_Header_Content">
<blockTable colWidths="100.0,80.0,80.0,110.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
<td><para style="terp_tblheader_General_Centre">Chat Account</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Entries Sorted By</para></td>
<td><para style="terp_tblheader_General_Centre">Account</para></td>
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
<td><para style="terp_tblheader_General_Centre">End Period</para></td>
<td><para style="terp_tblheader_General_Centre">Filters By</para></td>
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
<td><para style="terp_tblheader_General_Centre">Filters By <font>[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
</tr>
</blockTable>
<blockTable colWidths="60.0,60.0,60.0,60.0,59.0,59.0,59.0,59.0,59.0" style="Table_Subheader_Content_detail">
<tr>
<td><para style="terp_default_Centre_8">[[ data['form']['date_from'] ]]</para></td>
<td><para style="terp_default_Centre_8">[[ data['form']['date_to'] ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8"></para></td>
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ data['form']['filter'] ]]</para></td>
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] </para></td>
</tr>
</blockTable>
<tr>
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[['' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="50.0,50.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
</tr>
<tr>
<td><para style="terp_default_Centre_8">[[ data['form']['date_from'] ]]</para></td>
<td><para style="terp_default_Centre_8">[[ data['form']['date_to'] ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="50.0,50.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
</tr>
<tr>
<td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True) ]] </para></td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="72.0,218.0,89.0,83.0,77.0" style="Table_Journal_Title" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<blockTable colWidths="72.0,118.0,89.0,83.0,77.0,100.0" style="Table_Journal_Title" repeatRows="1">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details">Code</para></td>
<td><para style="terp_tblheader_Details">Journal Name</para></td>
<td><para style="terp_tblheader_Details">Period</para></td>
<td><para style="terp_tblheader_Details_Right">Debit</para></td>
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
<td><para style="terp_tblheader_Details_Right">Balance</para></td>
</tr>
<tr>
<td><para style="terp_default_Bold_9">Total:</para></td>
@ -255,15 +301,17 @@
<td><para style="terp_default_Bold_9"><font color="white"> </font></para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit()- sum_credit()) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="70.0,180.0,70.0,73.0,77.0,60.0" style="Table_Journal_Title" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<blockTable colWidths="70.0,100.0,70.0,73.0,77.0,60.0,80.0" style="Table_Journal_Title" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details">Code</para></td>
<td><para style="terp_tblheader_Details">Journal Name</para></td>
<td><para style="terp_tblheader_Details">Period</para></td>
<td><para style="terp_tblheader_Details_Right">Debit</para></td>
<td><para style="terp_tblheader_Details_Right">Credit</para></td>
<td><para style="terp_tblheader_Details_Right">Balance</para></td>
<td><para style="terp_tblheader_Details_Right">Currency</para></td>
</tr>
<tr>
@ -272,12 +320,13 @@
<td><para style="terp_default_Bold_9">[[ o.name ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit()- sum_credit()) ]]</para></td>
<td><para style="terp_default_Bold_9_Right"><u>[[formatLang(sum_currency_amount_account(o, data['form'])) ]]</u></para></td>
</tr>
</blockTable>
<section>
<blockTable colWidths="71.0,219.0,91.0,83.0,76.0" style="Table_Journal_Detail">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<blockTable colWidths="71.0,119.0,91.0,83.0,76.0,100.0" style="Table_Journal_Detail">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para>
@ -294,15 +343,19 @@
<td>
<para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line['debit']-line['debit'] ) ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="70.0,180.0,70.0,73.0,77.0,60.0" style="Table_Journal_Detail">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<blockTable colWidths="70.0,100.0,70.0,73.0,77.0,60.0,80.0" style="Table_Journal_Detail">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_default_9"><font>[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para></td>
<td><para style="terp_default_9">[[ line['name'] ]]</para></td>
<td><para style="terp_default_9">[[ o.name ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['debit'] )]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['credit']) ]]</para></td>
<td><para style="terp_default_Right_9">[[ formatLang(line['debit']-line['debit'] ) ]]</para></td>
<td><para style="terp_default_Right_9"><u>[[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] ]]</u></para></td>
</tr>
</blockTable>