[ADD][IMP][REM] account, account_voucher: added another format voucher report , improved the existing reports and removed the unused voucher report.
bzr revid: vra@tinyerp.com-20100920104059-iizb7h5g3lwuls7a
This commit is contained in:
parent
3c941860c1
commit
dc822ca892
|
@ -30,6 +30,7 @@ class report_voucher_move(report_sxw.rml_parse):
|
|||
self.localcontext.update({
|
||||
'time': time,
|
||||
'convert':self.convert,
|
||||
'get_title': self.get_title,
|
||||
'debit':self.debit,
|
||||
'credit':self.credit,
|
||||
#'get_ref' : self._get_ref
|
||||
|
@ -41,6 +42,13 @@ class report_voucher_move(report_sxw.rml_parse):
|
|||
cur = user_id.company_id.currency_id.name
|
||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
|
||||
return amt_en
|
||||
|
||||
def get_title(self, voucher):
|
||||
title = ''
|
||||
if voucher.journal_id:
|
||||
type = voucher.journal_id.type
|
||||
title = type[0].swapcase() + type[1:] + " Voucher"
|
||||
return title
|
||||
|
||||
def debit(self, move_ids):
|
||||
debit = 0.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
@ -10,6 +10,10 @@
|
|||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
@ -94,15 +98,12 @@
|
|||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
@ -116,19 +117,19 @@
|
|||
<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_9" fontName="Helvetica-Bold" 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_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" 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_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.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_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
|
@ -161,45 +162,55 @@
|
|||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P11">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<para style="P8">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<blockTable colWidths="524.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ get_title(voucher) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,200.0,52.0,210.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Journal:</para>
|
||||
<para style="terp_tblheader_General">Journal:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.journal_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Number:</para>
|
||||
<para style="terp_tblheader_General">Number:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ voucher.name ]]</para>
|
||||
<para style="terp_default_9">[[ voucher.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="63.0,72.0,44.0,84.0,52.0,210.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">State:</para>
|
||||
<para style="terp_tblheader_General">State:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P7">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P7">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P7">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_default_9">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_default_9">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_default_9">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_default_9">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Ref. :</para>
|
||||
<para style="terp_tblheader_General">Ref. :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7">[[ voucher.ref]]</para>
|
||||
<para style="terp_default_9">[[ voucher.ref]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Date:</para>
|
||||
<para style="terp_tblheader_General">Date:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ formatLang(voucher.date , date=True) or '' ]]</para>
|
||||
<para style="terp_default_9">[[ formatLang(voucher.date , date=True) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -280,7 +291,7 @@
|
|||
<blockTable colWidths="313.0,106.0,105.0" style="last_info">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">Through : </para>
|
||||
<para style="P4">Through : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">
|
||||
|
@ -310,7 +321,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">On Account of : </para>
|
||||
<para style="P4">On Account of : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">
|
||||
|
@ -325,7 +336,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">[[ voucher.line_id and voucher.line_id[0].name or removeParentNode('para') ]]</para>
|
||||
<para style="P7">[[ voucher.line_id and voucher.line_id[0].name or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">
|
||||
|
@ -340,22 +351,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">Amount (in words) : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P9">[[ convert(voucher.amount) ]]</para>
|
||||
<para style="P4">Amount (in words) : </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
|
@ -368,6 +364,21 @@
|
|||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P7">[[ convert(voucher.amount) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_1">
|
||||
<font color="white"> </font>
|
||||
|
@ -375,7 +386,7 @@
|
|||
<blockTable colWidths="313.0,106.0,105.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P6">
|
||||
<para style="P5">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
|
@ -399,12 +410,6 @@
|
|||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
|
@ -424,15 +429,15 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P8">Receiver's Signature</para>
|
||||
<para style="P6">Receiver's Signature</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">
|
||||
<para style="P6">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">
|
||||
<para style="P6">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
##############################################################################
|
||||
|
||||
import report_voucher
|
||||
import report_voucher_amount
|
||||
import report_voucher_print
|
||||
|
|
|
@ -29,6 +29,7 @@ class report_voucher(report_sxw.rml_parse):
|
|||
self.localcontext.update({
|
||||
'time': time,
|
||||
'convert':self.convert,
|
||||
'get_title': self.get_title,
|
||||
'debit':self.debit,
|
||||
'credit':self.credit,
|
||||
'get_ref' : self._get_ref
|
||||
|
@ -38,6 +39,12 @@ class report_voucher(report_sxw.rml_parse):
|
|||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
|
||||
return amt_en
|
||||
|
||||
def get_title(self, type):
|
||||
title = ''
|
||||
if type:
|
||||
title = type[0].swapcase() + type[1:] + " Voucher"
|
||||
return title
|
||||
|
||||
def debit(self, move_ids):
|
||||
debit = 0.0
|
||||
for move in move_ids:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
@ -10,6 +10,10 @@
|
|||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
@ -89,14 +93,11 @@
|
|||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P7" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
@ -110,14 +111,14 @@
|
|||
<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_9" fontName="Helvetica-Bold" 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_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" 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"/>
|
||||
|
@ -154,23 +155,27 @@
|
|||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P8">[[ repeatIn(objects,'voucher') ]]</para>ref
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">
|
||||
<para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<blockTable colWidths="524.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header_Centre">[[ get_title(voucher.type) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="63.0,200.0,52.0,210.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Journal:</para>
|
||||
<para style="terp_tblheader_General">Journal:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.journal_id.name ]]</para>
|
||||
<para style="terp_default_9">[[ voucher.type ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Number:</para>
|
||||
<para style="terp_tblheader_General">Number:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.number ]]</para>
|
||||
|
@ -180,22 +185,22 @@
|
|||
<blockTable colWidths="63.0,72.0,44.0,84.0,52.0,210.0" style="Table8">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">State:</para>
|
||||
<para style="terp_tblheader_General">State:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P3">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P3">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P3">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P2">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Ref. :</para>
|
||||
<para style="terp_tblheader_General">Ref. :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P1">[[ voucher.reference or '' ]]</para>
|
||||
<para style="terp_default_9">[[ voucher.reference or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Date:</para>
|
||||
<para style="terp_tblheader_General">Date:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(voucher.date , date=True) or '' ]]</para>
|
||||
|
@ -226,7 +231,7 @@
|
|||
<blockTable colWidths="276.0,126.0,123.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P4">[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] </para>
|
||||
<para style="P3">[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(move_ids.debit) ]]</para>
|
||||
|
@ -237,7 +242,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P5">[[ move_ids.account_id.name ]] </para>
|
||||
<para style="P4">[[ move_ids.account_id.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">
|
||||
|
@ -252,7 +257,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8_Italic">[[ move_ids.name ]] - [[ voucher.reference or '' ]]</para>
|
||||
<para style="terp_default_8_Italic">[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
@ -371,7 +376,7 @@
|
|||
<blockTable colWidths="276.0,127.0,122.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P2">
|
||||
<para style="P1">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from report import report_sxw
|
||||
from tools import amount_to_text_en
|
||||
|
||||
class report_voucher_amount(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(report_voucher_amount, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'convert':self.convert
|
||||
})
|
||||
|
||||
def convert(self, amount, cur):
|
||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
|
||||
return amt_en
|
||||
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.voucher.cash_amount',
|
||||
'account.voucher',
|
||||
'addons/account_voucher/report/report_voucher_amount.rml',
|
||||
parser=report_voucher_amount,header="external"
|
||||
)
|
|
@ -0,0 +1,94 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from report import report_sxw
|
||||
from tools import amount_to_text_en
|
||||
|
||||
class report_voucher_print(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(report_voucher_print, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_title': self.get_title,
|
||||
'get_lines':self.get_lines,
|
||||
'get_on_account':self.get_on_account,
|
||||
'convert':self.convert
|
||||
})
|
||||
|
||||
def convert(self, amount, cur):
|
||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
|
||||
return amt_en
|
||||
|
||||
def get_lines(self,voucher):
|
||||
result = []
|
||||
if voucher.type in ('payment','receipt'):
|
||||
type = voucher.line_ids and voucher.line_ids[0].type or False
|
||||
for move in voucher.move_ids:
|
||||
res = {}
|
||||
amount = move.credit
|
||||
if type == 'dr':
|
||||
amount = move.debit
|
||||
if amount > 0.0:
|
||||
res['pname'] = move.partner_id.name
|
||||
res['ref'] = 'Agst Ref'+" "+str(move.name)
|
||||
res['aname'] = move.account_id.name
|
||||
res['amount'] = amount
|
||||
result.append(res)
|
||||
else:
|
||||
type = voucher.line_ids and voucher.line_ids[0].type or False
|
||||
for move in voucher.move_ids:
|
||||
res = {}
|
||||
amount = move.credit
|
||||
if type == 'dr':
|
||||
amount = move.debit
|
||||
if amount > 0.0:
|
||||
res['pname'] = move.partner_id.name
|
||||
res['ref'] = move.name
|
||||
res['aname'] = move.account_id.name
|
||||
res['amount'] = amount
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
def get_title(self, type):
|
||||
title = ''
|
||||
if type:
|
||||
title = type[0].swapcase() + type[1:] + " Voucher"
|
||||
return title
|
||||
|
||||
def get_on_account(self, voucher):
|
||||
name = ""
|
||||
if voucher.type == 'receipt':
|
||||
name = "Received cash from "+str(voucher.partner_id.name)
|
||||
elif voucher.type == 'payment':
|
||||
name = "Payment from "+str(voucher.partner_id.name)
|
||||
elif voucher.type == 'sale':
|
||||
name = "Sale to "+str(voucher.partner_id.name)
|
||||
elif voucher.type == 'purchase':
|
||||
name = "Purchase from "+str(voucher.partner_id.name)
|
||||
return name
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.voucher.print',
|
||||
'account.voucher',
|
||||
'addons/account_voucher/report/report_voucher_print.rml',
|
||||
parser=report_voucher_print,header="external"
|
||||
)
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Voucher Amount" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
@ -10,51 +10,17 @@
|
|||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#b3b3b3" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table4">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="0,0" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="1,0" stop="1,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="2,0" stop="2,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="3,0" stop="3,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="4,0" stop="4,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="4,-1" stop="4,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#b3b3b3" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEAFTER" colorName="#b3b3b3" start="5,0" stop="5,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#b3b3b3" start="5,0" stop="5,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="5,-1" stop="5,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Heading1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
|
@ -65,7 +31,7 @@
|
|||
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
@ -92,9 +58,8 @@
|
|||
<paraStyle name="P1" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P3" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P4" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
|
@ -108,16 +73,16 @@
|
|||
<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_9" fontName="Helvetica-Bold" 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_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_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="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" 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_header_Right" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
|
@ -149,71 +114,87 @@
|
|||
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_9_30" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_50" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_50_italic" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_50_italic" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9_30cm" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="P6">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<blockTable colWidths="52.0,123.0,50.0,92.0,63.0,144.0" style="Table2">
|
||||
<para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
|
||||
<blockTable colWidths="524.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Type:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.journal_id.nme ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Number:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.number ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Date:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ formatLang(voucher.date , date=True) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="52.0,123.0,50.0,92.0,63.0,144.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">State:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P5">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P5">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P5">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Ref:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">[[ voucher.reference ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Account:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.account_id.name ]]</para>
|
||||
<para style="terp_header_Centre">[[ get_title(voucher.type) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="52.0,123.0,50.0,198.0,42.0,59.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Number:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.number ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Date:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(voucher.date , date=True) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="52.0,123.0,50.0,198.0,42.0,59.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">State:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P4">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P4">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P4">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Currency:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ voucher.currency_id.code ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="381.0,144.0" style="Heading1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_header">Particulars</para>
|
||||
<para style="terp_tblheader_Details">Particulars</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Right">Amount</para>
|
||||
<para style="terp_tblheader_Details_Right">Amount</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -221,29 +202,29 @@
|
|||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(voucher.payment_ids,'payment_ids') ]] </para>
|
||||
<blockTable colWidths="380.0,144.0" style="Table1">
|
||||
<para style="terp_default_8">[[ repeatIn(get_lines(voucher),'p') ]] </para>
|
||||
<blockTable colWidths="380.0,144.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">[[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]] </para>
|
||||
<para style="terp_default_Bold_9">Account :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ payment_ids.amount ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_30">[[ payment_ids.account_id.name ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P4">
|
||||
<para style="terp_default_Right_9_Bold">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_50_italic">[[ payment_ids.ref ]] [[ payment_ids.amount ]] </para>
|
||||
<para style="terp_default_9_30cm">[[ p['pname'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ p['amount'] ]] [[ voucher.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_30cm">[[ p['ref'] ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
@ -253,7 +234,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_50_italic">[[ payment_ids.type ]]</para>
|
||||
<para style="terp_default_9_30cm">Account : [[ p['aname'] ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50">
|
||||
|
@ -282,7 +263,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9_50_italic">[[ voucher.narration or '' ]] </para>
|
||||
<para style="terp_default_9_30">[[ voucher.journal_id.name or '' ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_50_italic">
|
||||
|
@ -302,7 +283,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ voucher.name ]]</para>
|
||||
<para style="terp_default_9_30">[[ get_on_account(voucher) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9_30">
|
||||
|
@ -322,7 +303,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
<para style="terp_default_9_30">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">
|
||||
|
@ -337,12 +318,12 @@
|
|||
<blockTable colWidths="380.0,144.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P3">
|
||||
<para style="terp_default_Right_9_Bold">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_header_Right">[[ voucher.amount ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ voucher.amount ]] [[ voucher.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -358,9 +339,6 @@
|
|||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
|
@ -6,8 +6,19 @@
|
|||
model="account.voucher"
|
||||
name="voucher.cash_receipt.drcr"
|
||||
rml="account_voucher/report/report_voucher.rml"
|
||||
groups="base.group_extended"
|
||||
auto="False"
|
||||
header = "False"
|
||||
menu="True"/>
|
||||
|
||||
<report id="report_account_voucher_print"
|
||||
string="Voucher Print"
|
||||
model="account.voucher"
|
||||
name="voucher.print"
|
||||
rml="account_voucher/report/report_voucher_print.rml"
|
||||
auto="False"
|
||||
header = "False"
|
||||
menu="True"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue