Commit 9538d33b authored by Jérome Perrin's avatar Jérome Perrin

imporved journal report


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4726 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 551563c9
...@@ -52,14 +52,27 @@ ...@@ -52,14 +52,27 @@
<template bottommargin=\'2cm\' showboundary=\'0\' topmargin=\'2cm\' \n <template bottommargin=\'2cm\' showboundary=\'0\' topmargin=\'2cm\' \n
rightmargin=\'2cm\' tal:define=\'portal python:here.portal_url.getPortalObject()\' \n rightmargin=\'2cm\' tal:define=\'portal python:here.portal_url.getPortalObject()\' \n
filename=\'journal.pdf\' pagesize=\'A4\' allowsplitting=\'1\' landscape=\'0\' leftmargin=\'2cm\'>\n filename=\'journal.pdf\' pagesize=\'A4\' allowsplitting=\'1\' landscape=\'0\' leftmargin=\'2cm\'>\n
\n
<pagetemplate startframe=\'content\' id=\'FirstPage\'>\n <pagetemplate startframe=\'content\' id=\'FirstPage\'>\n
<static/>\n <static>\n
<infostring align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n
tal:content="python: here.translation_service.translate(\'ui\', \'Printed by %(user)s at %(date)s\') % {\'user\':user.getUserName(), \'date\':DateTime()}" >Printed by</infostring>\n
<infostring align="left" x="18cm" y= "0.5cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n
</static>\n
<frame showBoundary=\'0\' leftpadding=\'0.1cm\' height=\'23.94cm\' width=\'17.59cm\' rightpadding=\'0.1cm\' y=\'2cm\' x=\'2cm\' nextid=\'content\' toppadding=\'0.2cm\' id=\'content\' bottompadding=\'0.5cm\'/>\n <frame showBoundary=\'0\' leftpadding=\'0.1cm\' height=\'23.94cm\' width=\'17.59cm\' rightpadding=\'0.1cm\' y=\'2cm\' x=\'2cm\' nextid=\'content\' toppadding=\'0.2cm\' id=\'content\' bottompadding=\'0.5cm\'/>\n
</pagetemplate>\n </pagetemplate>\n
\n
<stylesheet>\n <stylesheet>\n
<paragraphstyle name="Title" parent="Normal" fontname="Helvetica-Bold" fontsize="32" align="CENTER"/>\n
<tablestyle name=\'default\'>\n <tablestyle name=\'default\'>\n
<stylecmd expr="(\'GRID\', (0,0), (-1,-1), 0.1, colors.black)"/>\n <stylecmd expr="(\'GRID\', (0,0), (-1,-1), 0.1, colors.black)"/>\n
</tablestyle>\n </tablestyle>\n
<paragraphstyle name="TableStandard" parent="Normal" fontname="Helvetica" fontsize="8" alignment="left" />\n
<paragraphstyle name="TableStandardLeftAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="left" />\n
<paragraphstyle name="TableStandardRightAligned" parent="Normal" fontname="Helvetica" fontsize="7" alignment="right" />\n
<paragraphstyle name="TableHeader" parent="Normal" fontname="Helvetica-Oblique" fontsize="9" alignment="left" />\n
<paragraphstyle name="TableLastLine" parent="Normal" fontname="Helvetica-Oblique" fontsize="11" alignment="left" />\n
\n
<tablestyle name=\'transaction_header\'>\n <tablestyle name=\'transaction_header\'>\n
<stylecmd expr="(\'LINEBELOW\', (2,0), (2,0), 0.1, colors.black)"/> \n <stylecmd expr="(\'LINEBELOW\', (2,0), (2,0), 0.1, colors.black)"/> \n
<stylecmd expr="(\'LINEBELOW\', (-3,0), (-3,0), 0.1, colors.black)"/> \n <stylecmd expr="(\'LINEBELOW\', (-3,0), (-3,0), 0.1, colors.black)"/> \n
...@@ -92,6 +105,14 @@ ...@@ -92,6 +105,14 @@
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n <stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\n </tablestyle>\n
\n \n
<tablestyle name="AttributesTable">\n
<stylecmd expr="(\'INNERGRID\', (0,0), (-1,-1), 1, (0.5,0.5,0.5))"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (0,-1), (0.9,0.9,0.9))"/>\n
<stylecmd expr="(\'ALIGN\', (0,0), (-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (-1,-1), \'TOP\')"/>\n
</tablestyle>\n
\n \n
</stylesheet>\n </stylesheet>\n
</template>\n </template>\n
......
...@@ -55,30 +55,59 @@ ...@@ -55,30 +55,59 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="latin1"?>\n <?xml version="1.0" encoding="latin1"?>\n
<document filename="journal.pdf" tal:define="portal python:here.portal_url.getPortalObject()">\n <document filename="journal.pdf" tal:define="portal here/portal_url/getPortalObject;\n
<title>Title</title>\n transaction_list here/AccountingTransactionModule_getJournalAccountingTransactionList">\n
<author>Author</author>\n <title>Journal</title>\n
<subject>Subject</subject>\n <author>ERP5</author>\n
<subject>Journal</subject>\n
<content xmlns:tal="http://xml.zope.org/namespaces/tal">\n <content xmlns:tal="http://xml.zope.org/namespaces/tal">\n
<para style="Title" i18n:translate="" i18n:domain="ui">Journal</para>\n
<action name="nextPageTemplate">\n
<parameter>FirstPage</parameter>\n
</action>\n
<spacer height="50"/>\n
\n
<table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n
<tr tal:condition="python: request.get(\'from_date\', 0)">\n
<td colwidth="5cm"> <para style="TableHeader" tal:content="python: here.Base_TranslateString(\'From Date\')"/> </td>\n
<td colwidth="15cm"> <para style="TableStandardRightAligned" tal:content="python: here.Base_FormatDate(request.get(\'from_date\'))"/></td> </tr>\n
<tr>\n
<td colwidth="5cm"> <para style="TableHeader" tal:content="python: here.Base_TranslateString(\'At Date\')"/> </td>\n
<td colwidth="15cm"> <para style="TableStandardRightAligned" tal:content="python: here.Base_FormatDate(request.get(\'at_date\'))"/></td> </tr>\n
<tr>\n
<td colwidth="5cm"> <para style="TableHeader" tal:content="python: here.Base_TranslateString(\'Section\')"/> </td>\n
<td colwidth="15cm"> <para style="TableStandardRightAligned" tal:content="python: here.portal_categories.restrictedTraverse(request.get(\'transaction_section_category\')).getLogicalPath()"/></td> </tr>\n
<tr>\n
<td colwidth="5cm"> <para style="TableHeader" tal:content="python: here.Base_TranslateString(\'Transactions Simulation State\')"/> </td>\n
<td colwidth="15cm"> <tal:block tal:repeat="state python:request.get(\'transaction_simulation_state\', [])">\n
<para style="TableStandardRightAligned" tal:content="state"/> </tal:block> </td> </tr>\n
<tr>\n
<td colwidth="5cm"> <para style="TableHeader" tal:content="python: here.Base_TranslateString(\'Journal Type\')"/> </td>\n
<td colwidth="15cm"> <tal:block tal:repeat="type python:request.get(\'transaction_portal_type\', [])">\n
<para style="TableStandardRightAligned" tal:content="python: here.Base_TranslateString(type)"/> </tal:block> </td> </tr>\n
\n
</table>\n
<spacer height="10"/>\n
\n
<table style="top_of_page" splitbyrow="1" repeatrows="0" repeatcols="0">\n <table style="top_of_page" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.512cm">\n <tr rowheight="0.512cm">\n
<td colwidth="1.5cm">Debit</td>\n <td colwidth="1.5cm">Debit</td>\n
<td colwidth="1.5cm">Credit</td>\n <td colwidth="1.5cm">Credit</td>\n
<td colwidth="13cm">Account Title</td>\n <td colwidth="12cm">Account Title</td>\n
<td colwidth="2cm">Debit</td>\n <td colwidth="2.5cm">Debit</td>\n
<td colwidth="2cm">Credit</td>\n <td colwidth="2.5cm">Credit</td>\n
</tr>\n </tr>\n
</table>\n </table>\n
<tal:block tal:repeat="transaction python:here.AccountingTransactionModule_getJournalAccountingTransactionList()">\n <tal:block tal:repeat="transaction python:transaction_list[:-1]">\n
<table style="transaction_header" splitbyrow="1" repeatrows="0" repeatcols="0">\n <table style="transaction_header" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.5cm">\n <tr rowheight="0.5cm">\n
<td colwidth="1.5cm"/>\n <td colwidth="1.5cm"/>\n
<td colwidth="1.5cm"/>\n <td colwidth="1.5cm"/>\n
<td colwidth="5cm"/>\n <td colwidth="4.5cm"/>\n
<td colwidth="3cm" tal:content="transaction/date">Date</td>\n <td colwidth="3cm" tal:content="transaction/date">Date</td>\n
<td colwidth="5cm"/>\n <td colwidth="4.5cm"/>\n
<td colwidth="2cm"/>\n <td colwidth="2.5cm"/>\n
<td colwidth="2cm"/>\n <td colwidth="2.5cm"/>\n
</tr>\n </tr>\n
</table>\n </table>\n
<tal:block tal:repeat="line transaction/lines">\n <tal:block tal:repeat="line transaction/lines">\n
...@@ -90,9 +119,9 @@ ...@@ -90,9 +119,9 @@
<td colwidth="2cm"/>\n <td colwidth="2cm"/>\n
</tal:block>\n </tal:block>\n
<td colwidth="modified"\n <td colwidth="modified"\n
tal:attributes="colwidth python: line[\'debtor\'] and \'13cm\' or \'11cm\' ;" tal:content="python:line[\'account_name\']"/>\n tal:attributes="colwidth python: line[\'debtor\'] and \'12cm\' or \'10cm\' ;" tal:content="python:line[\'account_name\']"/>\n
<td colwidth="2cm" tal:content="python:line[\'debtor\'] and line[\'amount\'] or \' \' "/>\n <td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and here.ERP5Accounting_FormatMonetaryValue(line[\'amount\']) or \' \' "/>\n
<td colwidth="2cm" tal:content="python:line[\'debtor\'] and \' \' or line[\'amount\'] "/>\n <td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and \' \' or here.ERP5Accounting_FormatMonetaryValue(line[\'amount\']) "/>\n
</tr>\n </tr>\n
</table>\n </table>\n
</tal:block>\n </tal:block>\n
...@@ -101,9 +130,35 @@ ...@@ -101,9 +130,35 @@
<td colwidth="1.5cm"/>\n <td colwidth="1.5cm"/>\n
<td colwidth="1.5cm"/>\n <td colwidth="1.5cm"/>\n
<td colwidth="0.5cm"/>\n <td colwidth="0.5cm"/>\n
<td colwidth="12.5cm" tal:content="transaction/description"/>\n <td colwidth="11.5cm" tal:content="transaction/description"/>\n
<td colwidth="2cm"/>\n <td colwidth="2.5cm"/>\n
<td colwidth="2.5cm"/>\n
</tr>\n
</table>\n
</tal:block>\n
\n
<tal:block tal:replace="nothing"> Summary.\n
</tal:block>\n
<tal:block>\n
<table style="transaction_header" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.5cm">\n
<td colwidth="1.5cm"/>\n
<td colwidth="1.5cm"/>\n
<td colwidth="4.5cm"/>\n
<td colwidth="3cm"/>\n
<td colwidth="4.5cm"/>\n
<td colwidth="2.5cm"/>\n
<td colwidth="2.5cm"/>\n
</tr>\n
</table>\n
<table style="transaction_body" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="1.5cm">\n
<td colwidth="1.5cm"/>\n
<td colwidth="1.5cm"/>\n
<td colwidth="2cm"/>\n <td colwidth="2cm"/>\n
<td colwidth="10cm" > Total </td>\n
<td colwidth="2.5cm" tal:content="python: here.ERP5Accounting_FormatMonetaryValue(transaction_list[-1][\'journal_total_debit\']) "/>\n
<td colwidth="2.5cm" tal:content="python: here.ERP5Accounting_FormatMonetaryValue(transaction_list[-1][\'journal_total_credit\']) "/>\n
</tr>\n </tr>\n
</table>\n </table>\n
</tal:block>\n </tal:block>\n
......
...@@ -81,7 +81,9 @@ ...@@ -81,7 +81,9 @@
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -120,7 +122,9 @@ ...@@ -120,7 +122,9 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -152,9 +156,7 @@ ...@@ -152,9 +156,7 @@
</item> </item>
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -262,7 +264,7 @@ ...@@ -262,7 +264,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>6</int> </value> <value> <int>5</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -287,6 +289,25 @@ ...@@ -287,6 +289,25 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>AccountingTransactionModule_getTranslatedPortalTypeItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
...@@ -300,7 +321,7 @@ ...@@ -300,7 +321,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:[(here.translation_service.translate(\'ui\', pt).encode(\'utf8\'), pt) for pt in (\'Accounting Transaction\', \'Sale Invoice Transaction\', \'Purchase Invoice Transaction\', \'Pay Sheet Transaction\', \'Payment Transaction\', \'Balance Transaction\')]</string> </value> <value> <string>python: [ x[1] for x in here.AccountingTransactionModule_getTranslatedPortalTypeItemList()]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Base_getTranslatedWorkflowStateItemList(\'accounting_workflow\')</string> </value> <value> <string>python:here.Base_getTranslatedWorkflowStateItemList()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment