[MERGE] merged the apa branch related to yaml tests and reports

bzr revid: qdp-launchpad@tinyerp.com-20101229145310-mx1a9myrfzs3sqf8
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-12-29 15:53:10 +01:00
commit cffcef1a9d
49 changed files with 789 additions and 841 deletions

View File

@ -133,7 +133,9 @@ module named account_voucher.
'test/account_bank_statement.yml', 'test/account_bank_statement.yml',
'test/account_cash_statement.yml', 'test/account_cash_statement.yml',
'test/account_report.yml', 'test/account_report.yml',
],
],
'installable': True, 'installable': True,
'active': False, 'active': False,
'certificate': '0080331923549', 'certificate': '0080331923549',

View File

@ -253,13 +253,13 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] </font></para> <para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] </font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para> <para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para> <para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -205,13 +205,15 @@
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]]</font></para> <para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]]</font></para>
</td> </td>
<td> <td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code'] ]]</font></para> <para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines(), 'a') ]]</font> <font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font><font>[[ a['code'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para> <para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]]</font></para> <para style="terp_default_Right_9"><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font>
<font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]</font>
<font> [[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]]</font></para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -233,7 +233,7 @@
<td><para style="terp_header"><font color="white"> </font></para></td> <td><para style="terp_header"><font color="white"> </font></para></td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="90.0,80.0,100.0,130.0,100.0" style="Table2"> <blockTable colWidths="130.0,80.0,100.0,130.0,100.0" style="Table2">
<tr> <tr>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para> <td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td> <para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
@ -274,7 +274,7 @@
<para style="P9"> <para style="P9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Account_detail_Title">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_tblheader_Details">A/C No.</para></td> <td><para style="terp_tblheader_Details">A/C No.</para></td>
<td><para style="terp_tblheader_Details">Account Name</para></td> <td><para style="terp_tblheader_Details">Account Name</para></td>
@ -293,7 +293,7 @@
<td><para style="terp_tblheader_Details_Right">Currency</para></td> <td><para style="terp_tblheader_Details_Right">Currency</para></td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_default_Bold_9">Total:</para></td> <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"><font color="white"> </font></para></td>
@ -314,7 +314,7 @@
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]]</para>
<blockTable colWidths="50.0,260.0,80.0,80.0,80.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable colWidths="50.0,240.0,85.0,85.0,90.0" style="Table_Journal_Line_Content">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_default_9">[[ line['code'] ]]</para></td> <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_9">[[ line['name'] ]]</para></td>

View File

@ -263,11 +263,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.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_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.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_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_default_Bold_7" fontName="Helvetica-Bold" fontSize="7.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.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_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" 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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Bold_7_Right" fontName="Helvetica-Bold" fontSize="7.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/> <images/>
</stylesheet> </stylesheet>
@ -313,7 +313,7 @@
<para style="terp_tblheader_Details_Right">Currency</para> <para style="terp_tblheader_Details_Right">Currency</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="45.0,35.0,30.0,105.0,80.0,55.0,130.0,95.0,65.0,65.0,75.0" style="Table10">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] <blockTable colWidths="45.0,35.0,30.0,105.0,80.0,55.0,130.0,95.0,65.0,65.0,75.0" style="Table10">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
@ -496,19 +496,19 @@
<blockTable rowHeights="0.55cm" colWidths="490.0,65.0,65.0,75.0,75.0" style="Table8">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] <blockTable rowHeights="0.55cm" colWidths="490.0,65.0,65.0,75.0,75.0" style="Table8">[[data['form']['amount_currency'] == True or removeParentNode('blockTable')]]
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_8"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para> <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</para> <para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -526,7 +526,7 @@
<para style="terp_default_7">[[ line['lcode'] ]]</para> <para style="terp_default_7">[[ line['lcode'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['partner_name'],21) ]]</para> <para style="terp_default_7">[[ strip_name(line['partner_name'],20) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['lref'],17) ]]</para> <para style="terp_default_7">[[ strip_name(line['lref'],17) ]]</para>
@ -535,7 +535,7 @@
<para style="terp_default_7">[[ line['move'] ]]</para> <para style="terp_default_7">[[ line['move'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['lname'],26) ]]</para> <para style="terp_default_7">[[ strip_name(line['lname'],22) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para> <para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para>
@ -598,16 +598,16 @@
<blockTable rowHeights="0.55cm" colWidths="575.0,65.0,65.0,75.0" style="Table11">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] <blockTable rowHeights="0.55cm" colWidths="575.0,65.0,65.0,75.0" style="Table11">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_8"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para> <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_8_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -625,7 +625,7 @@
<para style="terp_default_7">[[ line['lcode'] ]]</para> <para style="terp_default_7">[[ line['lcode'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['partner_name'],25) ]]</para> <para style="terp_default_7">[[ strip_name(line['partner_name'],24) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['lref'],21) ]]</para> <para style="terp_default_7">[[ strip_name(line['lref'],21) ]]</para>
@ -634,7 +634,7 @@
<para style="terp_default_7">[[ line['move'] ]]</para> <para style="terp_default_7">[[ line['move'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['lname'],35) ]]</para> <para style="terp_default_7">[[ strip_name(line['lname'],28) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para> <para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para>

View File

@ -229,7 +229,7 @@
<para style="P9"> <para style="P9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable rowHeights="0.55cm" colWidths="40.0,75.0,50.0,50.0,72.0,131.0,68.0,68.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <blockTable rowHeights="0.55cm" colWidths="45.0,55.0,55.0,50.0,80.0,120.0,70.0,70.0" style="Table1" repeatRows="1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="P10a">Date</para></td> <td><para style="P10a">Date</para></td>
<td><para style="P10a">Ref</para></td> <td><para style="P10a">Ref</para></td>
@ -256,14 +256,14 @@
<td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td> <td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td>
<td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td> <td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td>
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td> <td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,16) ]]</para></td> <td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,17) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,35) ]]</para></td> <td><para style="terp_default_8">[[ strip_name(line.name,27) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td> <td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td> <td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable rowHeights="0.55cm" colWidths="40.0,75.0,50.0,50.0,72.0,66.0,68.0,68.0,68.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]] <blockTable rowHeights="0.55cm" colWidths="45.0,50.0,52.0,50.0,70.0,80.0,70.0,70.0,70.0" style="Table1" repeatRows="1">[[ display_currency(data) or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="P10a">Date</para></td> <td><para style="P10a">Date</para></td>
<td><para style="P10a">Ref</para></td> <td><para style="P10a">Ref</para></td>
@ -293,7 +293,7 @@
<td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td> <td><para style="terp_default_8">[[ strip_name(line.ref,20) ]]</para></td>
<td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td> <td><para style="terp_default_8">[[ line.move_id.name &lt;&gt; '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]]</para></td>
<td><para style="terp_default_8">[[ line.account_id.code ]]</para></td> <td><para style="terp_default_8">[[ line.account_id.code ]]</para></td>
<td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,16) ]]</para></td> <td><para style="terp_default_8">[[ line.partner_id and strip_name(line.partner_id.name,15) ]]</para></td>
<td><para style="terp_default_8">[[ strip_name(line.name,17) ]]</para></td> <td><para style="terp_default_8">[[ strip_name(line.name,17) ]]</para></td>
<td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td> <td><para style="P8">[[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]]</para></td>
<td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td> <td><para style="P8">[[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]]</para></td>

View File

@ -262,11 +262,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" 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_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" 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_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" 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"/> <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="8.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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/> <images/>
@ -274,67 +274,65 @@
<story> <story>
<pto> <pto>
<pto_header> <pto_header>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2"> <blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]] <tr>
<tr> <td>
<td> <para style="terp_tblheader_Details">Date</para>
<para style="terp_tblheader_Details">Date</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details">JNRL</para>
<para style="terp_tblheader_Details">JNRL</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details_Centre">Ref</para>
<para style="terp_tblheader_Details_Centre">Ref</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details_Centre">Account</para>
<para style="terp_tblheader_Details_Centre">Account</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details">Entry Label</para>
<para style="terp_tblheader_Details">Entry Label</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details_Right">Debit</para>
<para style="terp_tblheader_Details_Right">Debit</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details_Right">Credit</para>
<para style="terp_tblheader_Details_Right">Credit</para> </td>
</td> <td>
<td> <para style="terp_tblheader_Details_Right">Balance</para>
<para style="terp_tblheader_Details_Right">Balance</para> </td>
</td> </tr>
</tr> </blockTable>
</blockTable> <blockTable colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table8">
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8"> <tr>
[[ display_currency(data) == True or removeParentNode('blockTable') ]] <td>
<tr> <para style="terp_tblheader_Details">Date</para>
<td> </td>
<para style="terp_tblheader_Details">Date</para> <td>
</td> <para style="terp_tblheader_Details">JNRL</para>
<td> </td>
<para style="terp_tblheader_Details">JNRL</para> <td>
</td> <para style="terp_tblheader_Details_Centre">Ref</para>
<td> </td>
<para style="terp_tblheader_Details_Centre">Ref</para> <td>
</td> <para style="terp_tblheader_Details_Centre">Account</para>
<td> </td>
<para style="terp_tblheader_Details_Centre">Account</para> <td>
</td> <para style="terp_tblheader_Details">Entry Label</para>
<td> </td>
<para style="terp_tblheader_Details">Entry Label</para> <td>
</td> <para style="terp_tblheader_Details_Right">Debit</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">Credit</para> <td>
</td> <para style="terp_tblheader_Details_Right">Balance</para>
<td> </td>
<para style="terp_tblheader_Details_Right">Balance</para> <td>
</td> <para style="terp_tblheader_Details_Right">Currency</para>
<td> </td>
<para style="terp_tblheader_Details_Right">Currency</para> </tr>
</td> </blockTable>
</tr>
</blockTable>
</pto_header> </pto_header>
<para style="terp_default_8">[[ repeatIn(objects, 'p') ]]</para> <para style="terp_default_8">[[ repeatIn(objects, 'p') ]]</para>
<para style="terp_default_8">[[ setLang(p.lang) ]]</para> <para style="terp_default_8">[[ setLang(p.lang) ]]</para>
@ -439,7 +437,7 @@
<para style="terp_default_2"> <para style="terp_default_2">
<font face="Helvetica" color="white">[[ display_currency(data) == False or removeParentNode('section') ]]</font> <font face="Helvetica" color="white">[[ display_currency(data) == False or removeParentNode('section') ]]</font>
</para> </para>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2"> <blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
@ -490,47 +488,47 @@
<blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5"> <blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5">
<tr> <tr>
<td> <td>
<para style="terp_default_9">Initial Balance</para> <para style="terp_default_8">Initial Balance</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table6"> <blockTable rowHeights="0.55cm" colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table6">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para> <para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ line['code'] ]]</para> <para style="terp_default_8">[[ line['code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para> <para style="terp_default_8">[[ line['move_name'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para> <para style="terp_default_8">[[ line['a_code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para> <para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -540,7 +538,7 @@
<para style="terp_default_2"> <para style="terp_default_2">
<font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font> <font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font>
</para> </para>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8"> <blockTable colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table8">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
@ -571,7 +569,7 @@
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table12"> <blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table12">
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para> <para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para>
@ -594,7 +592,7 @@
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para> <para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table13"> <blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table13">
<tr> <tr>
<td> <td>
<para style="terp_default_9">Initial Balance</para> <para style="terp_default_9">Initial Balance</para>
@ -618,35 +616,35 @@
</section> </section>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table14"> <blockTable rowHeights="0.55cm" colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table14">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para> <para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ line['code'] ]]</para> <para style="terp_default_8">[[ line['code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para> <para style="terp_default_8">[[ line['move_name'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para> <para style="terp_default_8">[[ line['a_code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]</para> <para style="terp_default_8">[[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_8"> <para style="terp_default_Right_8">
<font face="Helvetica" size="8.0">[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font> <font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
</para> </para>
</td> </td>
</tr> </tr>
@ -655,4 +653,4 @@
</section> </section>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -262,11 +262,11 @@
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" 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_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" 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_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" 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"/> <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="8.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_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<images/> <images/>
@ -274,67 +274,67 @@
<story> <story>
<pto> <pto>
<pto_header> <pto_header>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2"> <blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]] [[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">JNRL</para> <para style="terp_tblheader_Details">JNRL</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Ref</para> <para style="terp_tblheader_Details_Centre">Ref</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Account</para> <para style="terp_tblheader_Details_Centre">Account</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">Entry Label</para> <para style="terp_tblheader_Details">Entry Label</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Debit</para> <para style="terp_tblheader_Details_Right">Debit</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Credit</para> <para style="terp_tblheader_Details_Right">Credit</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Balance</para> <para style="terp_tblheader_Details_Right">Balance</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8"> <blockTable colWidths="50.0,30.0,60.0,50.0,70.0,64.0,64.0,79.0,70.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]] [[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">JNRL</para> <para style="terp_tblheader_Details">JNRL</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Ref</para> <para style="terp_tblheader_Details_Centre">Ref</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Account</para> <para style="terp_tblheader_Details_Centre">Account</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">Entry Label</para> <para style="terp_tblheader_Details">Entry Label</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Debit</para> <para style="terp_tblheader_Details_Right">Debit</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Credit</para> <para style="terp_tblheader_Details_Right">Credit</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Balance</para> <para style="terp_tblheader_Details_Right">Balance</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Currency</para> <para style="terp_tblheader_Details_Right">Currency</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
</pto_header> </pto_header>
<para style="terp_default_8"> <para style="terp_default_8">
@ -434,7 +434,7 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table2"> <blockTable colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table2">
[[ display_currency(data) == False or removeParentNode('blockTable') ]] [[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
@ -493,53 +493,53 @@
<blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5"> <blockTable rowHeights="0.55cm" colWidths="332.0,64.0,64.0,79.0" style="Table5">
<tr> <tr>
<td> <td>
<para style="terp_default_9">Initial Balance</para> <para style="terp_default_8">Initial Balance</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,133.0,64.0,64.0,79.0" style="Table6"> <blockTable rowHeights="0.55cm" colWidths="50.0,30.0,60.0,60.0,130.0,64.0,64.0,79.0" style="Table6">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para> <para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ line['code'] ]]</para> <para style="terp_default_8">[[ line['code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para> <para style="terp_default_8">[[ line['move_name'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para> <para style="terp_default_8">[[ line['a_code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para> <para style="terp_default_8">[[ strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
</section> </section>
<blockTable colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table8"> <blockTable colWidths="50.0,30.0,60.0,50.0,70.0,64.0,64.0,79.0,70.0" style="Table8">
[[ display_currency(data) == True or removeParentNode('blockTable') ]] [[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr> <tr>
<td> <td>
@ -578,7 +578,7 @@
<font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font> <font face="Helvetica" color="white">[[ display_currency(data) == True or removeParentNode('section') ]]</font>
</para> </para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table12"> <blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table12">
<tr> <tr>
<td> <td>
<para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para> <para style="terp_default_Bold_9">[[ p.ref ]] - [[ p.name ]]</para>
@ -601,22 +601,22 @@
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para> <para style="terp_default_2"><font color="white">[[ data['form']['initial_balance']==True or removeParentNode('section') ]]</font></para>
<blockTable rowHeights="0.55cm" colWidths="261.0,64.0,64.0,79.0,71.0" style="Table13"> <blockTable rowHeights="0.55cm" colWidths="262.0,64.0,64.0,79.0,70.0" style="Table13">
<tr> <tr>
<td> <td>
<para style="terp_default_9">Initial Balance</para> <para style="terp_default_8">Initial Balance</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][0])]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][0])]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][1]) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9"> <para style="terp_default_Right_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
</td> </td>
@ -625,35 +625,35 @@
</section> </section>
<section> <section>
<para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para> <para style="terp_default_8">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable rowHeights="0.55cm" colWidths="42.0,31.0,62.0,62.0,62.0,64.0,64.0,79.0,71.0" style="Table14"> <blockTable rowHeights="0.55cm" colWidths="45.0,30.0,60.0,50.0,75.0,64.0,64.0,79.0,70.0" style="Table14">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para> <para style="terp_default_8">[[ formatLang(line['date'],date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ line['code'] ]]</para> <para style="terp_default_8">[[ line['code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['move_name'] ]]</para> <para style="terp_default_8">[[ line['move_name'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ line['a_code'] ]]</para> <para style="terp_default_8">[[ line['a_code'] ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_9">[[ strip_name(line['ref'],5) ]] - [[ strip_name(line['name'],5) ]]</para> <para style="terp_default_8">[[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['debit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['debit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['credit'])) ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['credit'])) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para> <para style="terp_default_Right_8">[[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_8"> <para style="terp_default_Right_8">
<font face="Helvetica" size="8.0">[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font> <font>[[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]]</font>
</para> </para>
</td> </td>
</tr> </tr>
@ -662,4 +662,4 @@
</section> </section>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content"> <blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table7"> <blockTableStyle id="Table7">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -178,20 +186,23 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="177.0,177.0,177.0" style="Table_Invoice_General_Header"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_General_Centre">Document</para> <para style="terp_tblheader_General_Centre">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Centre">Invoice Date</para> <para style="terp_tblheader_General_Centre">Invoice Date</para>
</td> </td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td> <td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para> <para style="terp_tblheader_General_Centre">Your Reference</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr> <tr>
<td> <td>
<para style="terp_default_Centre_9">[[ o.name or ' ' ]]</para> <para style="terp_default_Centre_9">[[ o.name or ' ' ]]</para>
@ -199,6 +210,9 @@
<td> <td>
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para> <para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td> </td>
<td>
<para style="terp_default_Centre_9">[[ o.origin or '' ]]</para>
</td>
<td> <td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para> <para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td> </td>
@ -207,31 +221,31 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7"> <blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_General">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Taxes</para> <para style="terp_tblheader_General_Centre">Taxes</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Quantity</para> <para style="terp_tblheader_General_Right">Quantity</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Unit Price </para> <para style="terp_tblheader_General_Right">Unit Price</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Disc.(%)</para> <para style="terp_tblheader_General_Right">Disc.(%)</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Price</para> <para style="terp_tblheader_General_Right">Price</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_2">[[ repeatIn(o.invoice_line,'l') ]]</para> <para style="terp_default_2">[[ repeatIn(o.invoice_line,'l') ]]</para>
<blockTable colWidths="202.0,88.0,71.0,57.0,42.0,71.0" style="Table8"> <blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table8">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ l.name ]]</para> <para style="terp_default_9">[[ l.name ]]</para>
@ -246,7 +260,7 @@
<para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para> <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] </para> <para style="terp_default_Centre_9">[[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
@ -284,7 +298,7 @@
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<blockTable colWidths="391.0,54.0,85.0" style="Table10"> <blockTable colWidths="385.0,60.0,85.0" style="Table10">
<tr> <tr>
<td> <td>
<para style="terp_default_8"> <para style="terp_default_8">
@ -393,4 +407,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -231,7 +231,7 @@
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]</para> <para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and company.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>

View File

@ -28,7 +28,6 @@
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {}) (data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {})
if tools.config['test_report_directory']: if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on Account Move, we will print the Voucher Report In order to test the PDF reports defined on Account Move, we will print the Voucher Report
- -
@ -37,311 +36,183 @@
(data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {}) (data, format) = netsvc.LocalService('report.account.move.voucher').create(cr, uid, [ref('account.account_move_0')], {}, {})
if tools.config['test_report_directory']: if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'account-voucher-report.'+format), 'wb+').write(data)
- -
Print the Aged Partner Balance Report Print the Aged Partner Balance Report
- -
!python {model: res.partner}: | !python {model: account.account}: |
import time ctx={}
from datetime import datetime ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from dateutil.relativedelta import relativedelta data_dict = {'chart_account_id':ref('account.chart0')}
start = datetime.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) from tools import test_reports
start = datetime(int(start.year), int(start.month), int(start.day)) test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account')
res = {}
for i in range(5)[::-1]:
stop = start - relativedelta(days=30)
res[str(i)] = {
'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))),
'stop': start.strftime('%Y-%m-%d'),
'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
}
start = stop - relativedelta(days=1)
obj_move = self.pool.get('account.move.line')
ctx = {}
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': \
{'chart_account_id':ref('account.chart0'),
'initial_balance': 1, 'periods': period_list,
'journal_ids':journal_ids, 'page_split': 0,
'date_from': time.strftime('%Y-%m-%d'),
'period_length': 30, 'amount_currency': 0,
'query_line' : query_line, 'result_selection':
'customer','direction_selection':
'past','fiscalyear_id':fy_id } }
data_dict['form'].update(res)
from tools.test_reports import try_report
try_report(cr, uid, 'report.account.aged_trial_balance', [], data_dict, context={})
- -
Print the Account Balance Sheet in Horizontal mode Print the Account Balance Sheet in Horizontal mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 1,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
(data, format) = netsvc.LocalService('report.account.balancesheet.horizontal').create(cr, uid, [], data_dict, {'periods': []}) data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet_horizontal.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
- -
Print the Account Balance Sheet in Normal mode Print the Account Balance Sheet in Normal mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
data_dict = {'model': 'ir.ui.menu', 'form': {'reserve_account_id':ref('account.rsa') ,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':[],'fiscalyear': ref('account.data_fiscalyear') ,'target_move': 'all'}} ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
(data, format) = netsvc.LocalService('report.account.balancesheet').create(cr, uid, [], data_dict, {'periods': []}) data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance_sheet.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_account_bs_report',wiz_data=data_dict, context=ctx, our_module='account')
- -
Print the Account Balance Report in Normal mode - From Account Chart Print the Account Balance Report in Normal mode through the wizard - From Account Chart
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
data_dict = {'model': 'account.account', 'form': {'chart_account_id':ref('account.chart0'),'select_account': False,'display_account':'bal_all','format_perc':0,'filter': 'filter_no','show_columns' :0, 'account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': ref('account.data_fiscalyear') ,'target_move': 'all','periods': [],'id':ref('account.bal'),'context':{'state':'all'}}} ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [ref('account.bal'),ref('account.gpf')], data_dict, {'periods': []}) data_dict = {'chart_account_id':ref('account.chart0')}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account')
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':[ref('account.bal'),ref('account.gpf')]})
(data, format) = netsvc.LocalService('report.account.account.balance').create(cr, uid, [], data_dict, {'periods': []})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-account_balance-normal-menu.'+format), 'wb+').write(data)
- -
Print the Central Journal Report - From Account Print the Central Journal Report - From Account
- -
!python {model: account.journal.period}: | !python {model: account.journal.period}: |
import netsvc, tools, os, time journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
fy_id = ref('account.data_fiscalyear') ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) ctx={}
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
obj_move = self.pool.get('account.move.line') test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.central.journal').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-central_journal-menu.'+format), 'wb+').write(data)
- -
Print the General Journal Report - From Journal Print the General Journal Report - From Journal
- -
!python {model: account.journal.period}: | !python {model: account.journal.period}: |
import netsvc, tools, os, time journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
fy_id = ref('account.data_fiscalyear') ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) ctx={}
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
obj_move = self.pool.get('account.move.line') test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu','id':journal_period_ids[0], 'form': {'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids, 'active_ids':journal_period_ids}}
(data, format) = netsvc.LocalService('report.account.general.journal').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_journal.'+format), 'wb+').write(data)
- -
Print the General Ledger Report in Normal Mode Print the General Ledger Report in Normal Mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False}
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] from tools import test_reports
acc_ids = [ref('account.bal'),ref('account.gpf')] test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query': query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-menu.'+format), 'wb+').write(data)
- -
Print the General Ledger Report in Landscape Mode Print the General Ledger Report in Landscape Mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] from tools import test_reports
acc_ids = [ref('account.bal'),ref('account.gpf')] test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.account', 'form': {'initial_balance': 1,'initial_bal_query':query_line,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','sortby': 'sort_date','amount_currency': 0,'landscape':1,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, acc_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.account.general.ledger_landscape').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-general_ledger-landscape-menu.'+format), 'wb+').write(data)
- -
Print Journal Report - From Model Print Journal Report - From Model
- -
!python {model: account.journal.period}: | !python {model: account.journal.period}: |
import netsvc, tools, os, time
fy_id = ref('account.data_fiscalyear')
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context)
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
obj_move = self.pool.get('account.move.line') data_dict = {'chart_account_id':ref('account.chart0')}
ctx = {} from tools import test_reports
ctx['fiscalyear'] = fy_id test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account')
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'account.journal.period', 'id':journal_period_ids[0], 'form': {'sort_selection': 'date','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'compare_pattern': 'none','account_choice': 'moves','landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':query_line,'target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal') }}
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal.'+format), 'wb+').write(data)
data_dict.update({'model': 'ir.ui.menu'})
data_dict['form'].update({'active_ids':journal_period_ids})
(data, format) = netsvc.LocalService('report.account.journal.period.print').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-print_journal-menu.'+format), 'wb+').write(data)
- -
Print the Partner Balance Report Print the Partner Balance Report
- -
!python {model: res.partner}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') data_dict = {'chart_account_id':ref('account.chart0')}
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] from tools import test_reports
journal_period_ids = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', journal_ids), ('period_id', 'in', period_list)], context=context) test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account')
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'active_ids':journal_period_ids,'display_partner': 'all','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.partner.balance').create(cr, uid, journal_period_ids, data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_balance.'+format), 'wb+').write(data)
- -
Print the Partner Ledger Report Print the Partner Ledger Report
- -
!python {model: res.partner}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True}
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': True,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger.'+format), 'wb+').write(data)
- -
Print the Partner Ledger-Other Report Print the Partner Ledger-Other Report
- -
!python {model: res.partner}: | !python {model: res.partner}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False}
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
obj_move = self.pool.get('account.move.line')
ctx = {}
ctx['fiscalyear'] = fy_id
ctx['journal_ids'] = journal_ids
ctx['chart_account_id'] = ref('account.chart0')
query_line = obj_move._query_get(cr, uid, obj='l', context=ctx)
data_dict = {'model': 'ir.ui.menu', 'form': {'initial_bal_query':query_line,'amount_currency': 0,'reconcil': True,'initial_balance':1,'page_split': False,'result_selection': 'customer','chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','display_type': 0,'journal_ids':journal_ids,'display_partner': 'non-zero_balance','fiscalyear': fy_id ,'target_move': 'all','query_line':query_line}}
(data, format) = netsvc.LocalService('report.account.third_party_ledger_other').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-partner_ledger-other.'+format), 'wb+').write(data)
- -
Print the Profit-Loss Report in Normal Mode Print the Profit-Loss Report in Normal Mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) data_dict = {'chart_account_id':ref('account.chart0'),'display_type': False}
journal_ids = [] from tools import test_reports
acc_ids = [ref('account.bal'),ref('account.gpf')] test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': False,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }}
(data, format) = netsvc.LocalService('report.pl.account').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss.'+format), 'wb+').write(data)
- -
Print the Profit-Loss Report in Horizontal Mode Print the Profit-Loss Report in Horizontal Mode
- -
!python {model: account.account}: | !python {model: account.account}: |
import netsvc, tools, os, time ctx={}
fy_id = ref('account.data_fiscalyear') ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
period_list = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', [fy_id])], context=context) data_dict = {'chart_account_id':ref('account.chart0'),'display_type': True}
journal_ids = [] from tools import test_reports
acc_ids = [ref('account.bal'),ref('account.gpf')] test_reports.try_report_action(cr, uid, 'action_account_pl_report',wiz_data=data_dict, context=ctx, our_module='account')
data_dict = {'model': 'ir.ui.menu', 'form': {'display_type': True,'chart_account_id':ref('account.chart0'),'display_account':'bal_all','filter': 'filter_no','amount_currency': 0,'landscape':0,'period_manner': 'actual','fiscalyear_id': fy_id ,'query_line':'True ','target_move': 'all','periods': period_list,'journal_ids':journal_ids,'id':ref('account.bal'),'active_ids':acc_ids }} -
(data, format) = netsvc.LocalService('report.pl.account.horizontal').create(cr, uid, [], data_dict, {}) Print the Analytic Balance Report through the wizard
if tools.config['test_report_directory']: -
file(os.path.join(tools.config['test_report_directory'], 'account-profit-loss-horizontal.'+format), 'wb+').write(data) !python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Cost Ledger Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Cost Ledger(Only Quantities) Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Analytic Journal Report through the wizard
-
!python {model: account.analytic.journal}: |
ctx={}
ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account')
-
Print the Inverted Analytic Balance Report through the wizard
-
!python {model: account.analytic.account}: |
ctx={}
ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
data_dict = {}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account')

View File

@ -79,7 +79,8 @@ class account_aged_trial_balance(osv.osv_memory):
} }
start = stop + relativedelta(days=1) start = stop + relativedelta(days=1)
data['form'].update(res) data['form'].update(res)
if data.get('form',False):
data['ids']=[data['form'].get('chart_account_id',False)]
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance', 'report_name': 'account.aged_trial_balance',

View File

@ -150,7 +150,7 @@
<para style="terp_tblheader_Details_Right">Amount</para> <para style="terp_tblheader_Details_Right">Amount</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Percentage</para> <para style="terp_tblheader_Details_Right">Perc(%)</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -222,7 +222,7 @@
<para style="terp_tblheader_Details_Right">Amount</para> <para style="terp_tblheader_Details_Right">Amount</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Percentage</para> <para style="terp_tblheader_Details_Right">Perc(%)</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -301,4 +301,4 @@
</section> </section>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -1,27 +1,33 @@
- -
Print the Analytic Budget Report in Normal mode Print the Analytic Budget Report through wizard
- -
!python {model: account.analytic.account}: | !python {model: account.analytic.account}: |
import netsvc, tools, os, time import netsvc, tools, os, time
data_dict = {'model': 'account.analytic.account', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'id':ref('account.analytic_root'),'context':{}}} ctx={}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account.analytic_root')], data_dict, {}) ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
if tools.config['test_report_directory']: data_dict = {}
file(os.path.join(tools.config['test_report_directory'], 'account_budget-analytic_budget_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data=data_dict, context=ctx, our_module='account_budget')
- -
Print the Budget Report in Normal mode Print the Budget Report through wizard
- -
!python {model: account.budget.post}: | !python {model: account.budget.post}: |
import netsvc, tools, os, time import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}} ctx={}
(data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {}) ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.account_budget_post_sales0')]})
if tools.config['test_report_directory']: data_dict = {}
file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_report',wiz_data=data_dict, context=ctx, our_module='account_budget')
- -
Print the CrossOvered Budget Report in Normal mode Print the CrossOvered Budget Report mode through wizard
- -
!python {model: crossovered.budget}: | !python {model: crossovered.budget}: |
import netsvc, tools, os, time import netsvc, tools, os, time
data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'report':'analytic-full','id':ref('account_budget.crossovered_budget_budgetoptimistic0'),'context':{}}} ctx={}
(data, format) = netsvc.LocalService('report.crossovered.budget.report').create(cr, uid, [ref('account_budget.crossovered_budget_budgetoptimistic0')], data_dict, {}) ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.crossovered_budget_budgetoptimistic0')]})
if tools.config['test_report_directory']: data_dict = {}
file(os.path.join(tools.config['test_report_directory'], 'account_budget-crossovered_budget_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_budget_crossvered_report',wiz_data=data_dict, context=ctx, our_module='account_budget')

View File

@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content"> <blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Tableau6"> <blockTableStyle id="Tableau6">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -237,20 +245,23 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_General_Centre">Document</para> <para style="terp_tblheader_General_Centre">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Centre">Invoice Date</para> <para style="terp_tblheader_General_Centre">Invoice Date</para>
</td> </td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td> <td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para> <para style="terp_tblheader_General_Centre">Your Reference</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr> <tr>
<td> <td>
<para style="terp_default_Centre_8">[[ o.name ]]</para> <para style="terp_default_Centre_8">[[ o.name ]]</para>
@ -258,6 +269,9 @@
<td> <td>
<para style="terp_default_Centre_8">[[ formatLang(o.date_invoice,date=True) ]]</para> <para style="terp_default_Centre_8">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td> </td>
<td>
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
</td>
<td> <td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para> <para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td> </td>
@ -493,4 +507,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -27,6 +27,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content"> <blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -41,6 +45,10 @@
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/> <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Tableau6"> <blockTableStyle id="Tableau6">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -241,20 +249,23 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="180.0,179.0,180.0" style="Table_Invoice_General_Header"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_General_Centre">Document</para> <para style="terp_tblheader_General_Centre">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_General_Centre">Invoice Date</para> <para style="terp_tblheader_General_Centre">Invoice Date</para>
</td> </td>
<td>
<para style="terp_tblheader_General_Centre">Origin</para>
</td>
<td> <td>
<para style="terp_tblheader_General_Centre">Partner Ref.</para> <para style="terp_tblheader_General_Centre">Your Reference</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="179.0,179.0,180.0" style="Table_General_Detail_Content"> <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
<tr> <tr>
<td> <td>
<para style="terp_default_Centre_9">[[ o.name ]]</para> <para style="terp_default_Centre_9">[[ o.name ]]</para>
@ -262,6 +273,9 @@
<td> <td>
<para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para> <para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
</td> </td>
<td>
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
</td>
<td> <td>
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para> <para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
</td> </td>
@ -382,7 +396,7 @@
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<blockTable colWidths="395.0,59.0,85.0" style="Tableau3"> <blockTable colWidths="390.0,64.0,85.0" style="Tableau3">
<tr> <tr>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">
@ -390,14 +404,14 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_9">Net Total:</para> <para style="terp_default_9">Net Total : </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="395.0,59.0,85.0" style="Table4"> <blockTable colWidths="390.0,64.0,85.0" style="Table4">
<tr> <tr>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">
@ -405,14 +419,14 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_9">Taxes:</para> <para style="terp_default_9">Taxes : </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="395.0,59.0,85.0" style="Table6"> <blockTable colWidths="390.0,64.0,85.0" style="Table6">
<tr> <tr>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">
@ -420,7 +434,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_Bold_9">Total:</para> <para style="terp_default_Bold_9">Total : </para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
@ -511,4 +525,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -19,12 +19,14 @@
(data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('test_invoice_1')], {}, {}) (data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']: if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data)
- -
Print the Invoice Layout Report with Message in Normal mode Print the Invoice Layout Report with Message through wizard
- -
!python {model: account.invoice}: | !python {model: account.invoice}: |
import netsvc, tools, os, time ctx={}
data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('test_invoice_1'),'context':{}}} ctx.update({'model': 'account.invoice','active_ids': [ref('test_invoice_1')]})
(data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('test_invoice_1')], data_dict, {}) data_dict = {'message':ref('account_invoice_layout.demo_message1')}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout')

View File

@ -210,7 +210,7 @@
<para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para> <para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_8">[[ get_company_currency() ]]</para> <para style="terp_default_Centre_8">[[ o.user_id and o.user_id.company_id and o.user_id.company_id.currency_id and o.user_id.company_id.currency_id.name or '' ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -287,4 +287,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -125,7 +125,7 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<para style="terp_default_9">[[ (not(o.sale_id) and o.type== 'out') and 'Error, no sale order attached to this picking !' or removeParentNode('para') ]]</para>
<blockTable colWidths="287.0,254.0" repeatRows="1" style="Tableau1"> <blockTable colWidths="287.0,254.0" repeatRows="1" style="Tableau1">
<tr> <tr>
<td> <td>
@ -226,4 +226,4 @@
</section> </section>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -29,7 +29,7 @@
<xsl:template name="story"> <xsl:template name="story">
<spacer length="1cm" /> <spacer length="1cm" />
<para style="terp_header_Centre" t="1">Attendance By Month</para> <para style="terp_header_Centre" t="1">Attendances By Month</para>
<spacer length="1cm" /> <spacer length="1cm" />
<blockTable> <blockTable>
<xsl:attribute name="style">week</xsl:attribute> <xsl:attribute name="style">week</xsl:attribute>

View File

@ -1,19 +1,20 @@
- -
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance By Month Print the HR Attendance Report By Month through the wizard
- -
!python {model: hr.employee}: | !python {model: hr.employee}: |
import netsvc, tools, os, time import time
data_dict = {'model': 'hr.employee', 'form': {'month': time.gmtime()[1], 'year': time.gmtime()[0]}} ctx={}
(data, format) = netsvc.LocalService('report.hr.attendance.bymonth').create(cr, uid, [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']: data_dict = {}
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-by_month_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_attendance_month',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
-
Print HR Attendance Error Report through the wizard
- -
In order to test the PDF reports defined on HR Attendance, we will print a report of HR Attendance Error
-
!python {model: hr.employee}: | !python {model: hr.employee}: |
import netsvc, tools, os, time import time
data_dict = {'model': 'hr.employee', 'form': {'init_date': time.strftime('%Y-01-01'), 'end_date':time.strftime('%Y-%m-%d'), 'emp_ids': [ref('hr.employee1')], 'max_delay': 120}} ctx={}
(data, format) = netsvc.LocalService('report.hr.attendance.error').create(cr, uid, [ref('hr.employee1')], data_dict, {}) ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1')]})
if tools.config['test_report_directory']: data_dict = {'init_date': time.strftime('%Y-01-01')}
file(os.path.join(tools.config['test_report_directory'], 'hr_attendance-error_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_attendance_error',wiz_data=data_dict, context=ctx, our_module='hr_attendance')

View File

@ -68,10 +68,8 @@
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
<blockValign value="TOP"/> <blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/> <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/> <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/> <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
</blockTableStyle> </blockTableStyle>
<initialize> <initialize>
<paraStyle name="all" alignment="justify"/> <paraStyle name="all" alignment="justify"/>
@ -113,7 +111,7 @@
<story> <story>
<pto> <pto>
<pto_header> <pto_header>
<blockTable colWidths="49.0,204.0,45.0,80.0,53.0,91.0" style="Table_hr_expense_line_header"> <blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_hr_expense_line_header">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
@ -122,7 +120,7 @@
<para style="terp_tblheader_Details">Name</para> <para style="terp_tblheader_Details">Name</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Ref.</para> <para style="terp_tblheader_Details">Ref.</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_Details_Right">Unit Price</para>
@ -131,7 +129,7 @@
<para style="terp_tblheader_Details_Right">Qty</para> <para style="terp_tblheader_Details_Right">Qty</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Total Price</para> <para style="terp_tblheader_Details_Right">Price</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -176,7 +174,7 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="49.0,204.0,45.0,80.0,53.0,91.0" style="Table_hr_expense_line_header"> <blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_hr_expense_line_header">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Date</para> <para style="terp_tblheader_Details">Date</para>
@ -185,7 +183,7 @@
<para style="terp_tblheader_Details">Name</para> <para style="terp_tblheader_Details">Name</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Ref.</para> <para style="terp_tblheader_Details">Ref.</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_Details_Right">Unit Price</para>
@ -194,7 +192,7 @@
<para style="terp_tblheader_Details_Right">Qty</para> <para style="terp_tblheader_Details_Right">Qty</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Total Price</para> <para style="terp_tblheader_Details_Right">Price</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -203,7 +201,7 @@
</para> </para>
<section> <section>
<para style="terp_default_8">[[ repeatIn(o.line_ids,'line') ]]</para> <para style="terp_default_8">[[ repeatIn(o.line_ids,'line') ]]</para>
<blockTable colWidths="49.0,204.0,46.0,79.0,53.0,92.0" style="Table_expense_line"> <blockTable colWidths="60.0,200.0,50.0,70.0,70.0,85.0" style="Table_expense_line">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ formatLang(line.date_value,date=True) ]]</para> <para style="terp_default_9">[[ formatLang(line.date_value,date=True) ]]</para>
@ -256,7 +254,7 @@
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<blockTable colWidths="57.0,171.0,171.0,32.0,92.0" style="Table_Final_total"> <blockTable colWidths="365.0,70.0,100.0" style="Table_Final_total">
<tr> <tr>
<td> <td>
<para style="terp_default_8"> <para style="terp_default_8">
@ -264,17 +262,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_8"> <para style="terp_tblheader_Details">Total:</para>
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Total:</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]</para> <para style="terp_tblheader_Details_Right">[[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]]</para>

View File

@ -244,7 +244,6 @@
<td> <td>
<para> <para>
<xsl:attribute name="style">digits</xsl:attribute> <xsl:attribute name="style">digits</xsl:attribute>
<xsl:value-of select="attribute::id"/>
</para> </para>
</td> </td>
<td> <td>

View File

@ -1,14 +1,22 @@
- -
In order to test the PDF reports defined on a HR Holidays, we will print HR Holidays Print the HR Holidays(Summary Department) Report through the wizard
- -
!python {model: hr.holidays}: | !python {model: hr.holidays}: |
import netsvc, tools, os, time import time
data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated' }} ctx={}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) ctx.update({'model': 'hr.department','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
if tools.config['test_report_directory']: data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Validated'}
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-dept_summary_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_dept',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
data_dict = {'model': 'hr.employee', 'form': {'date_from': time.strftime('%Y-%m-01'), 'depts' : [ref('hr.dep_sales')],'holiday_type' : 'Validated','emp':[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')] }}
(data, format) = netsvc.LocalService('report.holidays.summary').create(cr, uid, [], data_dict, {'active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}) -
if tools.config['test_report_directory']: Print the HR Holidays(Summary Employee) Report through the wizard
file(os.path.join(tools.config['test_report_directory'], 'hr_holidays-employee_summary_report.'+format), 'wb+').write(data) -
!python {model: hr.holidays}: |
import time
ctx={}
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])],'holiday_type' : 'Validated'}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_employee',wiz_data=data_dict, context=ctx, our_module='hr_holidays')

View File

@ -58,7 +58,7 @@
'test/payslip.yml', 'test/payslip.yml',
'test/payment_advice.yml', 'test/payment_advice.yml',
'test/payroll_register.yml', 'test/payroll_register.yml',
# 'test/hr_payroll_report.yml', # 'test/hr_payroll_report.yml',
], ],
'demo_xml': [ 'demo_xml': [
'hr_payroll_demo.xml' 'hr_payroll_demo.xml'

View File

@ -1,6 +1,6 @@
- -
In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure In order to test the PDF reports defined on HR Payroll, we will print Employees' Salary Structure
- -
!python {model: hr.employee}: | !python {model: hr.employee}: |
import netsvc, tools, os import netsvc, tools, os
(data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {}) (data, format) = netsvc.LocalService('report.salary.structure').create(cr, uid, [ref('hr_payroll.hr_employee_bonamy0')], {}, {})
@ -9,7 +9,7 @@
- -
Print HR Payslip Print HR Payslip
- -
!python {model: hr.payslip}: | !python {model: hr.payslip}: |
import netsvc, tools, os import netsvc, tools, os
(data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {}) (data, format) = netsvc.LocalService('report.payslip.pdf').create(cr, uid, [ref('hr_payroll.hr_payslip_salaryslipofbonamyforjune0')], {}, {})
@ -17,23 +17,25 @@
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-payslip_report.'+format), 'wb+').write(data)
- -
Print HR Employee Salary Details Print Employee Salary Statement through wizard
- -
!python {model: hr.payslip}: | !python {model: hr.payslip}: |
import netsvc, tools, os, time import time
emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')] ctx={}
data_dict = {'model': 'ir.ui.menu', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'employee_ids': emp_ids, 'ids':emp_ids }} ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
(data, format) = netsvc.LocalService('report.employees.salary').create(cr, uid, [], data_dict, {'active_ids': emp_ids}) data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_salary_detail_report.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_hr_payroll_employees_detail',wiz_data=data_dict, context=ctx, our_module='hr_payroll')
-
Print HR Employee Salary Details Annual basis -
- Print Salary Register through wizard
!python {model: hr.payslip}: | -
import netsvc, tools, os, time !python {model: hr.payslip}: |
emp_ids = [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')] import time
data_dict = {'model': 'hr.payslip', 'form': {'fiscalyear_id': ref('account.data_fiscalyear'), 'salary_on': 'current_month', 'employee_ids': emp_ids, 'ids':emp_ids}} ctx={}
(data, format) = netsvc.LocalService('report.year.salary').create(cr, uid, [], data_dict,{'active_ids': emp_ids} ) ctx.update({'model': 'hr.payslip','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')]})
if tools.config['test_report_directory']: data_dict = {'employee_ids': [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3'),ref('hr_payroll.hr_employee_bonamy0')])], 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
file(os.path.join(tools.config['test_report_directory'], 'hr_payroll-employee_yearly_salary_detail_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_hr_payroll_year_salary',wiz_data=data_dict, context=ctx, our_module='hr_payroll')

View File

@ -59,10 +59,10 @@ class hr_payroll_employees_detail(osv.osv_memory):
if context is None: if context is None:
context = {} context = {}
datas = {'ids': context.get('active_ids', [])} datas = {'ids': context.get('active_ids', [])}
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to'], context=context) res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to'], context=context)
res = res and res[0] or {} res = res and res[0] or {}
datas['form'] = res datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'employees.salary', 'report_name': 'employees.salary',
@ -71,4 +71,4 @@ class hr_payroll_employees_detail(osv.osv_memory):
hr_payroll_employees_detail() hr_payroll_employees_detail()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -64,6 +64,7 @@ class hr_payroll_year_salary(osv.osv_memory):
res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to', 'salary_on'], context=context) res = self.read(cr, uid, ids, ['employee_ids', 'date_from', 'date_to', 'salary_on'], context=context)
res = res and res[0] or {} res = res and res[0] or {}
datas['form'] = res datas['form'] = res
datas['ids'] = res.get('employee_ids',[])
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'year.salary', 'report_name': 'year.salary',
@ -72,4 +73,4 @@ class hr_payroll_year_salary(osv.osv_memory):
hr_payroll_year_salary() hr_payroll_year_salary()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -48,7 +48,7 @@
<xsl:template name="story"> <xsl:template name="story">
<spacer length="1cm" /> <spacer length="1cm" />
<para style="title" t="1">Timesheet</para> <para style="title" t="1">Timesheet by Employee</para>
<spacer length="1cm" /> <spacer length="1cm" />
<para style="employee"><xsl:value-of select="/report/employee" /></para> <para style="employee"><xsl:value-of select="/report/employee" /></para>
<spacer length="1cm" /> <spacer length="1cm" />

View File

@ -1,23 +1,21 @@
- -
In order to test the PDF reports defined on Employee, we will print Timesheet of a User Print the HR Timesheet By Employee report through the wizard
- -
!python {model: hr.employee}: | !python {model: hr.employee}: |
import netsvc, tools, os, time import netsvc, tools, os, time
month = time.gmtime()[1] ctx={}
year = time.gmtime()[0] ctx.update({'model': 'hr.employee','active_ids': []})
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_id' : ref('hr.employee1') }} data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_id' : ref('hr.employee1')}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet').create(cr, uid, [], data_dict, {}) from tools import test_reports
if tools.config['test_report_directory']: test_reports.try_report_action(cr, uid, 'action_hr_timesheet_my',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-user_report.'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on Employee, we will print Timesheet of Users Print the HR Timesheet By Employee report through the wizard
- -
!python {model: hr.employee}: | !python {model: hr.employee}: |
import netsvc, tools, os, time import netsvc, tools, os, time
month = time.gmtime()[1] ctx={}
year = time.gmtime()[0] ctx.update({'model': 'hr.employee','active_ids': []})
data_dict = {'model': 'ir.ui.menu', 'form': {'month': month, 'year' : year, 'employee_ids' : [ref('hr.employee1')] }} data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_ids' : [(6,0,[ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')])]}
(data, format) = netsvc.LocalService('report.hr.analytical.timesheet_users').create(cr, uid, [], data_dict, {}) from tools import test_reports
if tools.config['test_report_directory']: test_reports.try_report_action(cr, uid, 'action_hr_timesheet_users',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet-users_report.'+format), 'wb+').write(data)

View File

@ -7,14 +7,14 @@
(data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {}) (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {})
if tools.config['test_report_directory']: if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on HR Cost Ledger, we will print report of HR Cost Ledger Print the HR Cost Ledger report through the wizard
- -
!python {model: account.analytic.account}: | !python {model: account.analytic.account}: |
import netsvc, tools, os, time import netsvc, tools, os, time
ctx={}
acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')] acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')]
data_dict = {'model': 'ir.ui.menu', 'form': {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}} ctx.update({'model': 'ir.ui.menu','active_ids': acc_ids})
(data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, acc_ids, data_dict, {'active_ids': acc_ids}) data_dict = {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}
if tools.config['test_report_directory']: from tools import test_reports
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data) test_reports.try_report_action(cr, uid, 'action_hr_timesheet_invoice_cost_ledger',wiz_data=data_dict, context=ctx, our_module='hr_timesheet_invoice')

View File

@ -164,7 +164,7 @@
</blockTable> </blockTable>
</section> </section>
</section> </section>
<blockTable colWidths="421.0,44.0,63.0" style="Table2"> <blockTable colWidths="409.0,50.0,70.0" style="Table2">
<tr> <tr>
<td> <td>
<para style="terp_default_8"> <para style="terp_default_8">
@ -184,4 +184,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -129,7 +129,7 @@ class report_custom(report_rml):
<col t='yes'>%s</col> <col t='yes'>%s</col>
<col t='yes'>%s</col> <col t='yes'>%s</col>
</row> </row>
""" % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom')) """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') purchase_price_digits = rml_obj.get_digits(dp='Purchase Price')
@ -176,7 +176,7 @@ class report_custom(report_rml):
xml += "<lines style='lines'>" + xml_tmp + '</lines>' xml += "<lines style='lines'>" + xml_tmp + '</lines>'
xml += """<lines style='sub_total'> <row> xml += """<lines style='sub_total'> <row>
<col> """ + _('Component Cost of ') + str(number) +' '+ product.uom_id.name + """: </col> <col> """ + _('Components Cost of ') + str(number) +' '+ product.uom_id.name + """: </col>
<col/> <col/>
<col t='yes'/> <col t='yes'/>
<col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col> <col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>

View File

@ -17,19 +17,22 @@
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order_report.'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on a MRP, we will print Product Price Report Print Product Price Report through the wizard
- -
!python {model: product.product}: | !python {model: product.product}: |
import netsvc, tools, os ctx={}
(data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {}) ctx.update({'model': 'product.product','active_ids': [1,2,3,5]})
if tools.config['test_report_directory']: data_dict = {'number': 1}
file(os.path.join(tools.config['test_report_directory'], 'mrp-product_price_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_mrp_product_price_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')
- -
In order to test the PDF reports defined on a MRP, we will print Workcenter Load Report Print Work Center Load Report through the wizard
- -
!python {model: mrp.workcenter}: | !python {model: mrp.workcenter}: |
import netsvc, tools, os, time ctx={}
(data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {}) ctx.update({'model': 'mrp.workcenter','active_ids': [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')]})
if tools.config['test_report_directory']: data_dict = {'time_unit': 'day', 'measure_unit': 'hours'}
file(os.path.join(tools.config['test_report_directory'], 'mrp-workcenter_load_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_mrp_workcenter_load_wizard',wiz_data=data_dict, context=ctx, our_module='mrp')

View File

@ -199,7 +199,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_9">Net Total </para> <para style="terp_default_9">Net Total :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]]</para>
@ -212,7 +212,7 @@
</para> </para>
</td> </td>
<td> <td>
<para style="terp_default_9">Taxes</para> <para style="terp_default_9">Taxes :</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]]</para>
@ -236,4 +236,4 @@
<font color="white"> </font> <font color="white"> </font>
</para> </para>
</story> </story>
</document> </document>

View File

@ -51,22 +51,29 @@
(data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {}) (data, format) = netsvc.LocalService('report.pos.receipt.without.remboursment').create(cr, uid, [ref('point_of_sale.order_pos1'), ref('point_of_sale.order_pos2')], {}, {})
if tools.config['test_report_directory']: if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data) file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt without reimbursement report'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Payment Report Print the POS Payment Report through the wizard
- -
!python {model: ir.ui.menu}: | !python {model: ir.ui.menu}: |
import netsvc, tools, os, time import time
(data, format) = netsvc.LocalService('report.pos.payment.report.date').create(cr, uid, [1], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [ref('base.user_root')] }}, {}) ctx={}
if tools.config['test_report_directory']: ctx.update({'model': 'ir.ui.menu','active_ids': []})
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos sales lines report'+format), 'wb+').write(data) data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_id': [(6,0,[ref('base.user_root')])] }
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_report_pos_payment_repport_date',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
- -
In order to test the PDF reports defined on a Point Of Sale, we will print a POS Details Report Print the POS Details Report through the wizard
- -
!python {model: ir.ui.menu}: | !python {model: ir.ui.menu}: |
import netsvc, tools, os, time import time
(data, format) = netsvc.LocalService('report.pos.details').create(cr, uid, [], {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d') }}, {}) ctx={}
if tools.config['test_report_directory']: ctx.update({'model': 'ir.ui.menu','active_ids': []})
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale- pos details report'+format), 'wb+').write(data) data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d')}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
- -
I create a cash journal. I create a cash journal.
- -

View File

@ -51,6 +51,8 @@ class pos_details(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end'], context=context) res = self.read(cr, uid, ids, ['date_start', 'date_end'], context=context)
res = res and res[0] or {} res = res and res[0] or {}
datas['form'] = res datas['form'] = res
if res.get('id',False):
datas['ids']=[res['id']]
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'pos.details', 'report_name': 'pos.details',

View File

@ -44,7 +44,8 @@ class pos_payment_report_date(osv.osv_memory):
res = self.read(cr, uid, ids, ['date_start', 'date_end', 'user_id'], context=context) res = self.read(cr, uid, ids, ['date_start', 'date_end', 'user_id'], context=context)
res = res and res[0] or {} res = res and res[0] or {}
datas['form'] = res datas['form'] = res
if res.get('id',False):
datas['ids']=[res['id']]
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'pos.payment.report.date', 'report_name': 'pos.payment.report.date',

View File

@ -47,7 +47,6 @@ class pos_sales_user_today(osv.osv_memory):
res = self.read(cr, uid, ids, ['user_id'], context=context) res = self.read(cr, uid, ids, ['user_id'], context=context)
res = res and res[0] or {} res = res and res[0] or {}
datas['form'] = res datas['form'] = res
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'pos.sales.user.today', 'report_name': 'pos.sales.user.today',

View File

@ -1,17 +1,16 @@
- -
In order to test the PDF reports defined on Products, we will print a Products Pricelists Report Print the Products Pricelists Report through the wizard
- -
!python {model: product.product}: | !python {model: product.product}: |
import netsvc, tools, os ctx={}
data_dict = {'model': 'product.product'} ctx.update({'model': 'product.product','active_ids': [ref('product.product_product_pc1'), ref('product.product_product_pc3')]})
data_dict['form'] = { data_dict = {'qty1': 1,
'qty1': 1,
'qty2': 5, 'qty2': 5,
'qty3': 10, 'qty3': 10,
'qty4': 0, 'qty4': 0,
'qty5': 0, 'qty5': 0,
'price_list':ref('product.list0') 'price_list':ref('product.list0')}
} from tools import test_reports
(data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {}) test_reports.try_report_action(cr, uid, 'action_product_price_list',wiz_data=data_dict, context=ctx, our_module='product')
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'product-product_pricelist'+format), 'wb+').write(data)

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<document filename="test.pdf"> <document filename="HR Planning.pdf">
<template pageSize="(595.0,842.0)" title="HR Planning" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20"> <template pageSize="(595.0,842.0)" title="HR Planning" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first"> <pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/> <frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
</pageTemplate> </pageTemplate>
</template> </template>
<stylesheet> <stylesheet>
@ -15,7 +15,6 @@
<blockValign value="TOP"/> <blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="0,-1" stop="0,-1"/> <lineStyle kind="LINEBELOW" colorName="#808080" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="1,-1" stop="1,-1"/> <lineStyle kind="LINEBELOW" colorName="#808080" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#808080" start="2,-1" stop="2,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table6"> <blockTableStyle id="Table6">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
@ -24,17 +23,21 @@
<blockTableStyle id="Table3"> <blockTableStyle id="Table3">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
<blockValign value="TOP"/> <blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="Table8">
<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"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5"> <blockTableStyle id="Table5">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
<blockValign value="TOP"/> <blockValign value="TOP"/>
@ -42,33 +45,24 @@
<blockTableStyle id="Table4"> <blockTableStyle id="Table4">
<blockAlignment value="LEFT"/> <blockAlignment value="LEFT"/>
<blockValign value="TOP"/> <blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="0,0" stop="0,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="1,0" stop="1,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="1,-1" stop="1,-1"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="2,0" stop="2,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/> </blockTableStyle>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="3,0" stop="3,0"/> <blockTableStyle id="Table2">
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="3,-1" stop="3,-1"/> <blockAlignment value="LEFT"/>
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="4,0" stop="4,0"/> <blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="4,-1" stop="4,-1"/> <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"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
</blockTableStyle> </blockTableStyle>
<initialize> <initialize>
<paraStyle name="all" alignment="justify"/> <paraStyle name="all" alignment="justify"/>
</initialize> </initialize>
<paraStyle name="P1" fontName="Helvetica"/>
<paraStyle name="P2" fontName="Helvetica" alignment="RIGHT"/>
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="11.0" leading="14"/>
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="CENTER"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="14.0" leading="17"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="14"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="11.0" leading="14"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="16.0" leading="20" alignment="CENTER"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="20.0" leading="25" alignment="CENTER"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P12" fontName="Helvetica" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/> <paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
@ -77,139 +71,149 @@
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/> <paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10"/>
<paraStyle name="terp_header_center" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER"/>
<paraStyle name="terp_default_8_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="terp_default_9_right" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="terp_default_12_center_bold" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="terp_tbl_header" fontName="Helvetica-Bold" fontSize="8.0" leading="10"/>
<paraStyle name="terp_tbl_header_center" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="terp_tbl_header_right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="terp_default_9_center" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3"/>
<images/> <images/>
</stylesheet> </stylesheet>
<story> <story>
<para style="P1">[[ repeatIn(objects, 'o') ]]</para> <para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<para style="P1"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<para style="P1"> <para style="terp_header_center">HR Planning</para>
<para style="terp_default_8_center">[[ o.name]]</para>
<para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<para style="P10">HR Planning</para> <para style="terp_default_8">
<para style="Standard">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="149.0,192.0,141.0" repeatRows="1" style="Table1"> <blockTable colWidths="227.0,312.0" repeatRows="1" style="Table1">
<tr> <tr>
<td> <td>
<para style="P1"><font face="Helvetica">Responsible</font>: [[ o.user_id.name ]]</para> <para style="terp_default_9"><font fontName="Helvetica-Bold">Responsible : </font>[[ o.user_id.name ]]</para>
</td> </td>
<td> <td>
<para style="P11">[[ o.name]]</para> <para style="terp_default_9_right"><font fontName="Helvetica-Bold">From :</font> [[ formatLang(o.date_from,date=True) ]] <font fontName="Helvetica-Bold"> To : </font>[[ formatLang(o.date_to,date=True) ]]</para>
</td>
<td>
<para style="P2"><font face="Helvetica">From</font>: [[ formatLang(o.date_from,date=True) ]]</para>
<para style="P2"><font face="Helvetica">To</font>: [[ formatLang(o.date_to,date=True) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<para style="P4"> <blockTable colWidths="539.0" style="Table6">
<font color="white"> </font>
</para>
<para style="P5">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Table6">
<tr> <tr>
<td> <td>
<para style="P9">Summary by user</para> <para style="terp_default_8">
<para style="P9"> <font color="white"> </font>
</para>
<para style="terp_default_12_center_bold">Summary by user</para>
<para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="104.0,101.0,113.0,100.0,63.0" style="Table3"> <blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table3">
<tr> <tr>
<td> <td>
<para style="P7">User</para> <para style="terp_tbl_header">User</para>
</td> </td>
<td> <td>
<para style="P7">Total Planned Tasks</para> <para style="terp_tbl_header_center">Total planned tasks</para>
</td> </td>
<td> <td>
<para style="P7">Remaining tasks</para> <para style="terp_tbl_header_center">Remaining tasks</para>
</td> </td>
<td> <td>
<para style="P7">Time without</para> <para style="terp_tbl_header_center">Time without tasks</para>
<para style="P7">tasks</para>
</td> </td>
<td> <td>
<para style="P8">Timesheet</para> <para style="terp_tbl_header_center">Timesheet</para>
</td>
</tr>
<tr>
<td>
<para style="P6">[[ repeatIn(o.planning_user_ids , 'u') ]] [[ u.user_id.name ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.plan_tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.free) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(u.timesheet) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<para style="P5"> <section>
<font color="white"> </font> <para style="terp_default_8">[[ repeatIn(o.planning_user_ids , 'u') ]]</para>
</para> <blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table8">
<blockTable colWidths="482.0" style="Table5"> <tr>
<td>
<para style="terp_default_9">[[ u.user_id.name ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.plan_tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.free) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(u.timesheet) ]]</para>
</td>
</tr>
</blockTable>
</section>
<blockTable colWidths="539.0" style="Table5">
<tr> <tr>
<td> <td>
<para style="P9">Summary by project</para> <para style="terp_default_8">
<para style="P9"> <font color="white"> </font>
</para>
<para style="terp_default_12_center_bold">Summary by project</para>
<para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<blockTable colWidths="104.0,103.0,112.0,101.0,63.0" style="Table4"> <blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table4">
<tr> <tr>
<td> <td>
<para style="P13">Project</para> <para style="terp_tbl_header">Project</para>
</td> </td>
<td> <td>
<para style="P7">Total Planned Tasks</para> <para style="terp_tbl_header_center">Total planned tasks</para>
</td> </td>
<td> <td>
<para style="P7">Remaining tasks</para> <para style="terp_tbl_header_center">Remaining tasks</para>
</td> </td>
<td> <td>
<para style="P7">Time without</para> <para style="terp_tbl_header_center">Time without tasks</para>
<para style="P7">tasks</para>
</td> </td>
<td> <td>
<para style="P8">Timesheet</para> <para style="terp_tbl_header_center">Timesheet</para>
</td>
</tr>
<tr>
<td>
<para style="P12"><font face="Helvetica" size="11.0">[[ repeatIn(o.planning_account , 'l') ]] </font>[ [[ l.account_id.code ]] ] [[ l.account_id.name ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.plan_tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.tasks) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.plan_open) ]]</para>
</td>
<td>
<para style="P6">[[ formatLang(l.timesheet) ]]</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<para style="P3"> <section>
<font color="white"> </font> <para style="terp_default_8">[[ repeatIn(o.planning_account , 'l') ]] </para>
</para> <blockTable colWidths="150.0,110.0,90.0,100.0,90.0" style="Table2">
<tr>
<td>
<para style="terp_default_9">[ [[ l.account_id.code ]] ] [[ l.account_id.name ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.plan_tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.tasks) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.plan_open) ]]</para>
</td>
<td>
<para style="terp_default_9_center">[[ formatLang(l.timesheet) ]]</para>
</td>
</tr>
</blockTable>
</section>
</story> </story>
</document> </document>

View File

@ -131,25 +131,25 @@
<story> <story>
<pto> <pto>
<pto_header> <pto_header>
<blockTable colWidths="180.0,85.0,71.0,71.0,57.0,71.0" repeatRows="1" style="Table_Header_Pur_ord_Line"> <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_General">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">Taxes</para> <para style="terp_tblheader_General">Taxes</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Date Req.</para> <para style="terp_tblheader_General">Date Req.</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Qty</para> <para style="terp_tblheader_General_Right">Qty</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_General_Right">Unit Price</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Net Price</para> <para style="terp_tblheader_General_Right">Net Price</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
@ -251,31 +251,31 @@
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="180.0,85.0,71.0,71.0,57.0,71.0" repeatRows="1" style="Table_Header_Pur_ord_Line"> <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_General">Description</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details">Taxes</para> <para style="terp_tblheader_General">Taxes</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Date Req.</para> <para style="terp_tblheader_General">Date Req.</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">Qty</para> <para style="terp_tblheader_General_Right">Qty</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_General_Right">Unit Price</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Net Price</para> <para style="terp_tblheader_General_Right">Net Price</para>
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_8">[[repeatIn(o.order_line,'line')]]</para> <para style="terp_default_8">[[repeatIn(o.order_line,'line')]]</para>
<blockTable colWidths="179.0,85.0,71.0,71.0,57.0,71.0" style="Table_Order_Pur_line_Content"> <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" style="Table_Order_Pur_line_Content">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ line.name ]]</para> <para style="terp_default_9">[[ line.name ]]</para>
@ -284,7 +284,7 @@
<para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para> <para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Centre_9">[[ formatLang( line.date_planned, date=True) ]]</para> <para style="terp_default_9">[[ formatLang( line.date_planned, date=True) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para> <para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para>
@ -328,7 +328,7 @@
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<blockTable colWidths="394.0,55.0,85.0" style="Table_All_Total_Detail"> <blockTable colWidths="375.0,60.0,100.0" style="Table_All_Total_Detail">
<tr> <tr>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">
@ -384,4 +384,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -10,7 +10,7 @@
<field name="model">board.board</field> <field name="model">board.board</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Sales Manager Dashboard"> <form string="Sales Dashboard">
<hpaned position="100"> <hpaned position="100">
<child1> <child1>
<action name="%(sale.action_quotation_for_sale)d" string="Quotations"/> <action name="%(sale.action_quotation_for_sale)d" string="Quotations"/>
@ -27,7 +27,7 @@
</record> </record>
<record id="open_board_sales_manager" model="ir.actions.act_window"> <record id="open_board_sales_manager" model="ir.actions.act_window">
<field name="name">Sales Manager Dashboard</field> <field name="name">Sales Dashboard</field>
<field name="res_model">board.board</field> <field name="res_model">board.board</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>

View File

@ -128,7 +128,7 @@
<story> <story>
<pto> <pto>
<pto_header> <pto_header>
<blockTable colWidths="202.0,94.0,68.0,59.0,50.0,63.0" repeatRows="1" style="Table4"> <blockTable colWidths="181.0,70.0,80.0,70.0,50.0,85.0" repeatRows="1" style="Table4">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_Details">Description</para>
@ -143,7 +143,7 @@
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_Details_Right">Unit Price</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Disc.(%)</para> <para style="terp_tblheader_Details_Centre">Disc.(%)</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Price</para> <para style="terp_tblheader_Details_Right">Price</para>
@ -241,7 +241,7 @@
<para style="terp_default_8"> <para style="terp_default_8">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<blockTable colWidths="202.0,94.0,68.0,59.0,50.0,63.0" repeatRows="1" style="Table4"> <blockTable colWidths="181.0,70.0,80.0,70.0,50.0,85.0" repeatRows="1" style="Table4">
<tr> <tr>
<td> <td>
<para style="terp_tblheader_Details">Description</para> <para style="terp_tblheader_Details">Description</para>
@ -256,7 +256,7 @@
<para style="terp_tblheader_Details_Right">Unit Price</para> <para style="terp_tblheader_Details_Right">Unit Price</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Disc.(%)</para> <para style="terp_tblheader_Details_Centre">Disc.(%)</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Price</para> <para style="terp_tblheader_Details_Right">Price</para>
@ -265,7 +265,7 @@
</blockTable> </blockTable>
<section> <section>
<para style="terp_default_1">[[repeatIn(o.order_line,'line')]]</para> <para style="terp_default_1">[[repeatIn(o.order_line,'line')]]</para>
<blockTable colWidths="203.0,94.0,47.0,22.0,59.0,42.0,70.0" style="Table5"> <blockTable colWidths="180.0,70.0,80.0,70.0,50.0,85.0" style="Table5">
<tr> <tr>
<td> <td>
<para style="terp_default_9">[[ line.name ]] </para> <para style="terp_default_9">[[ line.name ]] </para>
@ -274,16 +274,13 @@
<para style="terp_default_Centre_9">[[ ', '.join(map(lambda x: x.name, line.tax_id)) ]]</para> <para style="terp_default_Centre_9">[[ ', '.join(map(lambda x: x.name, line.tax_id)) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] </para> <para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.price_unit ) ]]</para> <para style="terp_default_Right_9">[[ formatLang(line.price_unit ) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.discount, digits=get_digits(dp='Sale Price')) ]]</para> <para style="terp_default_Centre_9">[[ formatLang(line.discount, digits=get_digits(dp='Sale Price')) ]]</para>
</td> </td>
<td> <td>
<para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]</para> <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]</para>
@ -326,7 +323,7 @@
</tr> </tr>
</blockTable> </blockTable>
</section> </section>
<blockTable colWidths="387.0,56.0,93.0" style="Table6"> <blockTable colWidths="381.0,60.0,93.0" style="Table6">
<tr> <tr>
<td> <td>
<para style="terp_default_9"> <para style="terp_default_9">

View File

@ -400,7 +400,7 @@ class sale_order(osv.osv):
inv_line_id = obj_invoice_line.copy(cr, uid, preline.id, {'invoice_id': False, 'price_unit': -preline.price_unit}) inv_line_id = obj_invoice_line.copy(cr, uid, preline.id, {'invoice_id': False, 'price_unit': -preline.price_unit})
lines.append(inv_line_id) lines.append(inv_line_id)
inv = { inv = {
'name': order.client_order_ref or order.name, 'name': order.client_order_ref or '',
'origin': order.name, 'origin': order.name,
'type': 'out_invoice', 'type': 'out_invoice',
'reference': "P%dSO%d" % (order.partner_id.id, order.id), 'reference': "P%dSO%d" % (order.partner_id.id, order.id),

View File

@ -248,7 +248,7 @@
<para style="terp_tblheader_Details_Centre">Lot</para> <para style="terp_tblheader_Details_Centre">Lot</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Centre">State</para> <para style="terp_tblheader_Details">State</para>
</td> </td>
<td> <td>
<para style="terp_tblheader_Details_Right">Location</para> <para style="terp_tblheader_Details_Right">Location</para>
@ -326,4 +326,4 @@
</para> </para>
</pto> </pto>
</story> </story>
</document> </document>

View File

@ -118,7 +118,7 @@ class survey_analysis(report_rml):
for survey in surv_obj.browse(cr, uid, ids): for survey in surv_obj.browse(cr, uid, ids):
rml += """<story> rml += """<story>
<para style="Title">Answer Summary</para> <para style="Title">Answers Summary</para>
<para style="Standard"><font></font></para> <para style="Standard"><font></font></para>
<para style="P2"> <para style="P2">
<font color="white"> </font> <font color="white"> </font>

View File

@ -25,6 +25,7 @@ from report.interface import report_rml
from tools import to_xml from tools import to_xml
import tools import tools
import time import time
from report import report_sxw
class survey_browse_response(report_rml): class survey_browse_response(report_rml):
def create(self, cr, uid, ids, datas, context): def create(self, cr, uid, ids, datas, context):
@ -176,6 +177,7 @@ class survey_browse_response(report_rml):
<paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="12" spaceBefore="0.0" spaceAfter="1.0"/> <paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="12" spaceBefore="0.0" spaceAfter="1.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_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.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_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> <paraStyle name="terp_tblheader_General_Centre_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="10.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_right_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> <paraStyle name="terp_tblheader_General_right_simple" fontName="Helvetica" fontSize="10.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
@ -186,6 +188,7 @@ class survey_browse_response(report_rml):
<images/> <images/>
<story>""" <story>"""
surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response') surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response')
rml_obj=report_sxw.rml_parse(cr, uid, surv_resp_obj._name,context)
if datas.has_key('form') and datas['form'].has_key('response_ids'): if datas.has_key('form') and datas['form'].has_key('response_ids'):
response_id = datas['form']['response_ids'] response_id = datas['form']['response_ids']
elif context.has_key('response_id') and context['response_id']: elif context.has_key('response_id') and context['response_id']:
@ -200,15 +203,22 @@ class survey_browse_response(report_rml):
for response in surv_resp_obj.browse(cr, uid, response_id): for response in surv_resp_obj.browse(cr, uid, response_id):
for survey in surv_obj.browse(cr, uid, [response.survey_id.id]): for survey in surv_obj.browse(cr, uid, [response.survey_id.id]):
tbl_width = float(_tbl_widths.replace('cm', '')) tbl_width = float(_tbl_widths.replace('cm', ''))
colwidth = "4.6cm,5cm," + str(tbl_width - 16.4) +"cm,4cm,3cm" colwidth = "2.5cm,4.8cm," + str(tbl_width - 15.0) +"cm,3.2cm,4.5cm"
resp_create = tools.ustr(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) resp_create = tools.ustr(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S')))
rml += """<blockTable colWidths='""" + colwidth + """' style="Table_heading"> rml += """<blockTable colWidths='""" + colwidth + """' style="Table_heading">
<tr> <tr>
<td><para style="terp_tblheader_General_Centre">Answer Create Date:- </para></td> <td><para style="terp_default_9_Bold">Print Date : </para></td>
<td><para style="terp_tblheader_General_Centre_simple">""" + to_xml(resp_create) + """</para></td> <td><para style="terp_default_9">""" + to_xml(rml_obj.formatLang(time.strftime("%Y-%m-%d %H:%M:%S"),date_time=True)) + """</para></td>
<td><para style="terp_tblheader_General_Centre"></para></td> <td><para style="terp_default_9"></para></td>
<td><para style="terp_tblheader_General_right">Answer By:- </para></td> <td><para style="terp_default_9_Bold">Answered by : </para></td>
<td><para style="terp_tblheader_General_right_simple">""" + to_xml(response.user_id.login or '') + """</para></td> <td><para style="terp_default_9">""" + to_xml(response.user_id.login or '') + """</para></td>
</tr>
<tr>
<td><para style="terp_default_9"></para></td>
<td><para style="terp_default_9"></para></td>
<td><para style="terp_default_9"></para></td>
<td><para style="terp_default_9_Bold">Answer Date : </para></td>
<td><para style="terp_default_9">""" + to_xml(resp_create) + """</para></td>
</tr> </tr>
</blockTable><para style="P2"></para>""" </blockTable><para style="P2"></para>"""

View File

@ -1,24 +1,29 @@
- -
In order to test the PDF reports defined on a Survey, we will print Survey Analysis Report Print the Survey Browse Response Report through the wizard
-
!python {model: survey}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.survey.analysis').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_analysis_report.'+format), 'wb+').write(data)
- -
In order to test the PDF reports defined on a Survey, we will print Survey Browse Response Report
-
!python {model: survey}: | !python {model: survey}: |
import netsvc, tools, os ctx={}
(data, format) = netsvc.LocalService('report.survey.browse.response').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
if tools.config['test_report_directory']: data_dict = {'response_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_browse_response_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_survey_print_answer',wiz_data=data_dict, context=ctx, our_module='survey')
-
Print the Survey Analysis Report through the wizard
- -
In order to test the PDF reports defined on a Survey, we will print Survey Form Report
-
!python {model: survey}: | !python {model: survey}: |
import netsvc, tools, os ctx={}
(data, format) = netsvc.LocalService('report.survey.form').create(cr, uid, [ref('survey.survey_partner_feedback')], {}, {}) ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
if tools.config['test_report_directory']: data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])]}
file(os.path.join(tools.config['test_report_directory'], 'survey-survey_form_report.'+format), 'wb+').write(data) from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_survey_print_statistics',wiz_data=data_dict, context=ctx, our_module='survey')
-
Print the Survey Form Report through the wizard
-
!python {model: survey}: |
ctx={}
ctx.update({'model': 'survey','active_ids': [(6,0,[ref('survey.survey_partner_feedback')])]})
data_dict = {'survey_ids' : [(6,0,[ref('survey.survey_partner_feedback')])], 'page_number' : True, 'without_pagebreak': True}
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_view_survey_print',wiz_data=data_dict, context=ctx, our_module='survey')