Commit 783efd4c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge remote-tracking branch 'origin/master' into erp5-component

parents 574d45a6 0d8e7211
Changes
=======
0.4.24 (2013-02-11)
-------------------
* erp5.util.testnode:
- Fixed wrong location for the construction os test suite software
[Sebastien Robin]
0.4.23 (2013-02-11)
-------------------
* erp5.util.testnode:
- Make erp5testnode allow remote access to test suite logs instead of
uploading them to master [Tatuya Kamada], [Sebastien Robin]
0.4.22 (2013-01-08)
-------------------
......
......@@ -99,7 +99,7 @@
<string>your_omit_grouping_reference</string>
<string>your_mirror_section_category_list</string>
<string>your_mirror_section</string>
<string>your_gap</string>
<string>your_gap_list</string>
<string>your_gap_root</string>
<string>your_simulation_state</string>
</list>
......@@ -111,7 +111,6 @@
<list>
<string>your_at_date</string>
<string>your_from_date</string>
<string>your_gap</string>
<string>your_gap_root</string>
<string>your_section_category</string>
<string>your_simulation_state</string>
......
......@@ -75,10 +75,10 @@ while date < context.getStopDate():\n
\n
if frequency == \'quarterly\':\n
period.setShortTitle(\'%s-%s\' % (\n
date.strftime(\'%Y %m\'), (end_date - 1).strftime(\'%m\')))\n
start_date.strftime(\'%Y %m\'), (end_date - 1).strftime(\'%m\')))\n
else:\n
period.setShortTitle(date.strftime(\'%Y-%m\'))\n
period.setTitle(str(translateString(date.strftime(\'%B\'))))\n
period.setShortTitle(start_date.strftime(\'%Y-%m\'))\n
period.setTitle(str(translateString(start_date.strftime(\'%B\'))))\n
\n
if open_periods:\n
period.start()\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
Returns journal entries, for use with AccountingTransactionModule_viewJournal\n
\n
return a list of dictionnaries like that :\n
\n
{ \'date\' : Date\n
, \'description\': String\n
, \'currency\' : String\n
, \'lines\' : { \'debtor\' : Bool\n
, \'account_gap_id\': String\n
, \'account_name\' : String # with extra-description (ie. bank name if a bank, organisation name if an other party)\n
, \'amount\' : Float\n
}\n
}\n
"""\n
\n
request = context.REQUEST\n
selection_name = "accounting_selection"\n
Base_translateString = context.Base_translateString\n
result = []\n
journal_total_debit = 0\n
journal_total_credit = 0\n
\n
# this report can be used in two ways:\n
# * with a report dialog to specify parameters\n
if request.has_key(\'at_date\'):\n
at_date = request[\'at_date\'].latestTime()\n
section_category = request[\'transaction_section_category\']\n
transaction_simulation_state = request[\'transaction_simulation_state\']\n
transaction_portal_type = request[\'transaction_portal_type\']\n
from_date = request.get(\'from_date\', None)\n
params = { \'sort_on\' : \'delivery.start_date\',\n
\'at_date\' : at_date,\n
\'simulation_state\': transaction_simulation_state,\n
\'search_result_keys\': [],\n
\'section_category\': section_category,\n
\'portal_type\' : transaction_portal_type, }\n
\n
if from_date:\n
params[\'from_date\'] = from_date\n
\n
zGetList = context.AccountingTransactionModule_zGetAccountingTransactionList\n
transaction_list = zGetList( selection_params = params\n
, **params\n
)\n
else:\n
stool = context.getPortalObject().portal_selections\n
transaction_list = [x.getObject() for x in \n
stool.callSelectionFor(selection_name)]\n
section_category = stool.getSelectionParamsFor(selection_name\n
).get(\'section_category\', \'unset\')\n
\n
for transaction in transaction_list:\n
transaction = transaction.getObject()\n
destination_section = transaction.getDestinationSectionValue()\n
source_section = transaction.getSourceSectionValue()\n
\n
# add a test on portal type to bypass bad acquisition of group category from\n
# person to Orignisation This help us filter employee of the source_section:\n
# because of acquisition via subordination they are seen as part of the group\n
# but in this accounting context group define a business unit composed of\n
# organisation\n
we_are_destination = (destination_section is not None) and \\\n
(\'group/%s\' % destination_section.getGroup(\'\')\n
).startswith(section_category) and \\\n
destination_section.getPortalType() == "Organisation"\n
we_are_source = (source_section is not None) and \\\n
(\'group/%s\' % source_section.getGroup(\'\')\n
).startswith(section_category) and \\\n
source_section.getPortalType() == "Organisation"\n
\n
if we_are_source:\n
specific_reference = transaction.getSourceReference()\n
date = transaction.getStartDate()\n
else:\n
specific_reference = transaction.getDestinationReference()\n
date = transaction.getStopDate()\n
\n
lines = []\n
transaction_dict = {\n
\'date\' : context.Base_FormatDate( date ),\n
\'lines\' : lines,\n
\'description\': Base_translateString(\n
"${transaction_title} (Transaction Reference "\n
"= ${transaction_reference},\\n Creation Date = "\n
"${creation_date} \\n Currency = ${currency_title})",\n
mapping = {\n
"transaction_title": unicode(transaction.getTitle() or \'\', \'utf8\'),\n
"transaction_reference": unicode(specific_reference or \'\', \'utf8\'),\n
"creation_date": context.Base_FormatDate(transaction.getCreationDate()),\n
"currency_title": transaction.getResourceTitle() or \'\' })}\n
\n
result.append(transaction_dict)\n
transaction_lines = transaction.contentValues(\n
filter = {\'portal_type\' : context.getPortalAccountingMovementTypeList()})\n
\n
if we_are_source :\n
transaction_lines.sort(key=lambda x: x.getObject().getSourceInventoriatedTotalAssetPrice(),\n
reverse=True)\n
else :\n
transaction_lines.sort(key=lambda x: x.getObject().getDestinationInventoriatedTotalAssetPrice(),\n
reverse=True)\n
\n
for line in transaction_lines:\n
line = line.getObject()\n
\n
if we_are_source :\n
debit = line.getSourceInventoriatedTotalAssetDebit() or 0.0\n
credit = line.getSourceInventoriatedTotalAssetCredit() or 0.0\n
debtor = (line.getSourceInventoriatedTotalAssetPrice() > 0)\n
account = line.getSourceValue()\n
if account is None: continue\n
if account.isMemberOf(\'account_type/asset/cash\'):\n
account_description = "%s (%s)" % ( line.getSourceTitle()\n
, line.getSourcePaymentTitle()\n
)\n
elif account.getAccountType() in (\'asset/receivable\',\n
\'liability/payable\'):\n
account_description = "%s (%s)" % ( line.getSourceTitle()\n
, line.getDestinationSectionTitle()\n
)\n
else:\n
account_description = line.getSourceTitle()\n
lines.append({ \'debtor\' : debtor\n
, \'account_gap_id\': account.Account_getGapId()\n
, \'account_name\' : account_description\n
, \'amount\' : debtor and (debit) or (credit)\n
})\n
if debtor:\n
journal_total_debit += debit\n
else:\n
journal_total_credit += credit\n
\n
if we_are_destination:\n
debit = line.getDestinationInventoriatedTotalAssetDebit() or 0.0\n
credit = line.getDestinationInventoriatedTotalAssetCredit() or 0.0\n
debtor = (debit > credit)\n
account = line.getDestinationValue()\n
if account is None: continue\n
if account.isMemberOf(\'account_type/asset/cash\'):\n
account_description = "%s (%s)" % ( line.getDestinationTitle()\n
, line.getDestinationPaymentTitle()\n
)\n
elif account.getAccountType() in (\'asset/receivable\',\n
\'liability/payable\'):\n
account_description = "%s (%s)" % ( line.getDestinationTitle()\n
, line.getSourceSectionTitle()\n
)\n
else:\n
account_description = line.getDestinationTitle()\n
lines.append({ \'debtor\' : debtor\n
, \'account_gap_id\': account.Account_getGapId()\n
, \'account_name\' : account_description\n
, \'amount\' : debtor and (debit) or (credit)\n
})\n
if debtor:\n
journal_total_debit += debit\n
else:\n
journal_total_credit += credit\n
\n
\n
return result + [{ "journal_total_debit" : journal_total_debit\n
, "journal_total_credit": journal_total_credit\n
}]\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getJournalAccountingTransactionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1"?>\n
<template bottommargin=\'2cm\' showboundary=\'0\' topmargin=\'2cm\' \n
rightmargin=\'2cm\' tal:define=\'portal python:here.portal_url.getPortalObject()\' \n
filename=\'journal.pdf\' pagesize=\'A4\' allowsplitting=\'1\' landscape=\'0\' leftmargin=\'2cm\'>\n
\n
<pagetemplate startframe=\'content\' id=\'FirstPage\'>\n
<static>\n
<infostring align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n
tal:content="python: here.Localizer.erp5_ui.gettext(\'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
</pagetemplate>\n
\n
<stylesheet>\n
<paragraphstyle name="Title" parent="Normal" fontname="Helvetica-Bold" fontsize="32" align="CENTER"/>\n
<tablestyle name=\'default\'>\n
<stylecmd expr="(\'GRID\', (0,0), (-1,-1), 0.1, colors.black)"/>\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
<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="(\'LINEBEFORE\', (0,0),(2,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'ALIGN\', (0,0),(-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0),(-1,-1), \'BOTTOM\')"/>\n
</tablestyle>\n
<tablestyle name=\'transaction_body\'>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'LINEBEFORE\', (0,0),(2,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'ALIGN\', (-2,0), (-1,-1), \'RIGHT\')"/>\n
</tablestyle>\n
<tablestyle name=\'transaction_footer\'>\n
<stylecmd expr="(\'LINEBEFORE\', (0,0),(2,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Times-Italic\', 10)"/>\n
</tablestyle>\n
\n
<tablestyle name="top_of_page">\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (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
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\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
</stylesheet>\n
</template>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_journal_pdf_template</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="latin1"?>\n
<document\n
filename="journal.pdf"\n
tal:define="portal here/portal_url/getPortalObject;\n
transaction_list here/AccountingTransactionModule_getJournalAccountingTransactionList;\n
precision here/Base_getPreferredPrecision">\n
<title>Journal</title>\n
<author>ERP5</author>\n
<subject>Journal</subject>\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"\n
repeatcols="0" style="AttributesTable"\n
tal:condition="request/at_date | nothing">\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
<tr rowheight="0.512cm">\n
<td colwidth="1.5cm">Debit</td>\n
<td colwidth="1.5cm">Credit</td>\n
<td colwidth="12cm">Account Title</td>\n
<td colwidth="2.5cm">Debit</td>\n
<td colwidth="2.5cm">Credit</td>\n
</tr>\n
</table>\n
<tal:block tal:repeat="transaction python:transaction_list[:-1]">\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" tal:content="transaction/date">Date</td>\n
<td colwidth="4.5cm"/>\n
<td colwidth="2.5cm"/>\n
<td colwidth="2.5cm"/>\n
</tr>\n
</table>\n
<tal:block tal:repeat="line transaction/lines">\n
<table style="transaction_body" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.512cm">\n
<td colwidth="1.5cm" tal:content="python:line[\'debtor\'] and line[\'account_gap_id\'] or \' \' "/>\n
<td colwidth="1.5cm" tal:content="python:line[\'debtor\'] and \' \' or line[\'account_gap_id\'] "/>\n
<tal:block tal:condition="not:line/debtor">\n
<td colwidth="2cm"/>\n
</tal:block>\n
<td colwidth="modified"\n
tal:attributes="colwidth python: line[\'debtor\'] and \'12cm\' or \'10cm\' ;" tal:content="python:line[\'account_name\']"/>\n
<td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and here.Base_getRoundValue(line[\'amount\'], precision) or \' \' "/>\n
<td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and \' \' or here.Base_getRoundValue(line[\'amount\'], precision) "/>\n
</tr>\n
</table>\n
</tal:block>\n
<table style="transaction_footer" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr>\n
<td colwidth="1.5cm"/>\n
<td colwidth="1.5cm"/>\n
<td colwidth="0.5cm"/>\n
<td colwidth="11.5cm" tal:content="transaction/description"/>\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="10cm" > Total </td>\n
<td colwidth="2.5cm" tal:content="python: here.Base_getRoundValue(transaction_list[-1][\'journal_total_debit\' ], precision) "/>\n
<td colwidth="2.5cm" tal:content="python: here.Base_getRoundValue(transaction_list[-1][\'journal_total_credit\'], precision) "/>\n
</tr>\n
</table>\n
</tal:block>\n
</content>\n
</document>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_viewJournalAsPdf</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>pdf_stylesheet</string> </key>
<value> <string>AccountingTransactionModule_journal_pdf_template</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -150,6 +150,7 @@ for (node, section, mirror_section, extra_parameter), line_info_list in lines_pe
\n
for line in line_info_list:\n
line_obj = portal.restrictedTraverse(line[\'path\'])\n
assert not line_obj.getGroupingReference(), line\n
line_obj.setGroupingReference(string_reference)\n
line_obj.setGroupingDate(date)\n
line_obj.reindexObject(activate_kw=dict(tag=\'accounting_grouping_reference\'))\n
......
......@@ -50,110 +50,19 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>src__ = 0\n
if kw.has_key(\'src__\'): src__ = kw[\'src__\']\n
precision = context.Base_getPreferredPrecision()\n
r_ = lambda x: context.Base_getRoundValue(x, precision)\n
\n
# read settings from user preference\n
preference = context.getPortalObject().portal_preferences\n
simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
section_category = preference.getPreferredAccountingTransactionSectionCategory()\n
from_date = preference.getPreferredAccountingTransactionFromDate()\n
at_date = preference.getPreferredAccountingTransactionAtDate()\n
\n
# Build the common inventory dict\n
params = {}\n
\n
if kw.get(\'no_from_date\', False): from_date = None\n
\n
if simulation_state: params[\'simulation_state\'] = simulation_state\n
params[\'section_uid\'] = context.Base_getSectionUidListForSectionCategory(section_category)\n
\n
\n
if kw.has_key(\'node_uid\') : params[\'node_uid\'] = kw[\'node_uid\']\n
if kw.has_key(\'portal_type\'): params[\'portal_type\'] = kw[\'portal_type\']\n
\n
# Create the related accouting line list\n
new_result = []\n
net_balance = 0.0\n
\n
if from_date is not None:\n
# Create a new parameter list to get the previous balance\n
get_inventory_kw = params.copy()\n
get_inventory_kw.update({ \'omit_simulation\' : True\n
, \'payment_uid\' : context.getUid()\n
, \'to_date\' : from_date\n
# , \'where_expression\': " section.portal_type = \'Organisation\' "\n
, \'stat\' : True\n
})\n
\n
getInventory = context.getPortalObject().portal_simulation.getInventory\n
# Get previous debit and credit\n
previous_total_debit = r_(getInventory(omit_output=True, **get_inventory_kw))\n
previous_total_credit = r_(getInventory(omit_input =True, **get_inventory_kw))\n
if previous_total_credit != 0:\n
previous_total_credit = - previous_total_credit\n
\n
# Show the previous balance if not empty\n
if previous_total_credit != 0 or previous_total_debit != 0:\n
from Products.ERP5Type.Document import newTempAccountingTransaction\n
\n
net_balance = r_(previous_total_debit - previous_total_credit)\n
previous_balance = newTempAccountingTransaction( context.getPortalObject()\n
, "temp_%s" % context.getUid()\n
)\n
previous_balance.setUid(\'new_000\')\n
\n
previous_balance.edit( \\\n
title = context.Base_translateString("Previous Balance")\n
, date = from_date - 1\n
, portal_type = ""\n
, simulation_state_title = ""\n
, debit = previous_total_debit\n
, credit = previous_total_credit\n
, balance = net_balance\n
, net_balance = net_balance\n
, is_previous_balance = True\n
)\n
new_result.append(previous_balance)\n
\n
\n
# Show / Hide grouping if needed\n
if kw.has_key(\'hide_grouping\'): params[\'hide_grouping\'] = kw[\'hide_grouping\']\n
\n
# FIXME:\n
# using listbox current page number * number of line per listbox page, you can call a\n
# ZSQL Method to initialize net_balance and calculate this only for this page.\n
#\n
# But this is just temporary because some day, erp5_accounting will be rewritten using\n
# only portal_catalog and getInventory. The Iventory API should provide a way to implement\n
# such a net_balance column (in one instruction, so that we do not need to write a wrapping\n
# list method like this one)\n
result = context.BankAccount_zGetAccountingTransactionList( from_date = from_date\n
, at_date = at_date\n
, src__ = src__\n
, **params\n
)\n
if src__:\n
return result\n
\n
# Add related accounting lines one by one in order to calculate intermediate balance\n
for l in result:\n
o = l.getObject()\n
net_balance += l.balance or 0.0\n
if o is not None:\n
c = o.asContext( net_balance = net_balance\n
, balance = l.balance\n
, credit = l.credit\n
, debit = l.debit\n
, date = l.date.toZone(l.getObject().getStartDate().timezone())\n
, section_title = l.section_title\n
, specific_reference = l.specific_reference\n
)\n
new_result.append(c)\n
\n
return new_result\n
<value> <string>"""Returns Accounting Transactions where this bank account is payment.\n
"""\n
kw[\'payment_uid\'] = context.getUid()\n
kw[\'node_category\'] = \'account_type/asset/cash/bank\'\n
transaction_list = context.Node_getAccountingTransactionList(**kw)\n
\n
# As we are showing quantities and not asset prices, we use the precision\n
# from this bank account currency\n
if context.getPriceCurrency():\n
container.REQUEST.set(\'precision\',\n
context.getQuantityPrecisionFromResource(context.getPriceCurrency()))\n
\n
return transaction_list\n
</string> </value>
</item>
<item>
......
......@@ -50,10 +50,13 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>kw[\'omit_input\'] = 1\n
debit = context.BankAccount_statSourceBalance(**kw)\n
return float(\'%.02f\' % debit)\n
# vim: syntax=python\n
<value> <string>"""Total balance (in local currency) of all accounting transactions having this\n
bank account as payment node\n
"""\n
kw[\'payment_uid\'] = context.getUid()\n
kw[\'asset_price\'] = False\n
kw[\'node_category\'] = \'account_type/asset/cash/bank\'\n
return context.Node_statAccountingBalance(**kw)\n
</string> </value>
</item>
<item>
......@@ -62,7 +65,7 @@ return float(\'%.02f\' % debit)\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BankAccount_statSourceDebit</string> </value>
<value> <string>BankAccount_statBalance</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -50,19 +50,26 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.log(old_method_name, \'%s is deprecated, use %s instead\'\n
% (old_method_name, new_method_name))\n
<value> <string>"""Total credit (in local currency) of all accounting transactions having this\n
bank account as payment\n
"""\n
kw[\'payment_uid\'] = context.getUid()\n
kw[\'omit_asset_increase\'] = 1\n
kw[\'asset_price\'] = False\n
kw[\'node_category\'] = \'account_type/asset/cash/bank\'\n
kw.update(kw[\'selection\'].getParams())\n
\n
return getattr(context, new_method_name)(*args, **kw)\n
# here, or 0 is to prevent displaying "- 0"\n
return - context.Node_statAccountingBalance(**kw) or 0\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>old_method_name, new_method_name, *args, **kw</string> </value>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_callDeprecatedMethod</string> </value>
<value> <string>BankAccount_statCredit</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -50,12 +50,16 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>kw[\'omit_output\'] = 1\n
credit = context.BankAccount_statSourceBalance(**kw)\n
if credit :\n
return float(\'%.02f\' % - credit)\n
return 0.0\n
# vim: syntax=python\n
<value> <string>"""Total debit (in local currency) of all accounting transactions having this\n
bank account as payment\n
"""\n
kw[\'payment_uid\'] = context.getUid()\n
kw[\'omit_asset_decrease\'] = 1\n
kw[\'asset_price\'] = False\n
kw[\'node_category\'] = \'account_type/asset/cash/bank\'\n
kw.update(kw[\'selection\'].getParams())\n
\n
return context.Node_statAccountingBalance(**kw)\n
</string> </value>
</item>
<item>
......@@ -64,7 +68,7 @@ return 0.0\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BankAccount_statSourceCredit</string> </value>
<value> <string>BankAccount_statDebit</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>params = {}\n
pref = context.getPortalObject().portal_preferences\n
precision = context.Base_getPreferredPrecision()\n
\n
###\n
# Get the \'from_date\' parameter\n
from_date = kw.get( \'from_date\'\n
, pref.getPreferredAccountingTransactionFromDate()\n
)\n
if from_date:\n
params[\'from_date\'] = from_date\n
\n
###\n
# Get the \'at_date\' parameter\n
at_date = kw.get( \'at_date\'\n
, pref.getPreferredAccountingTransactionAtDate()\n
)\n
if at_date:\n
params[\'at_date\'] = at_date\n
\n
###\n
# Get the \'simulation_state\' parameter\n
# Sometimes \'simulation_state\' is now as \'transaction_simulation_state\'\n
simulation_state = kw.get( \'transaction_simulation_state\'\n
, None\n
)\n
if not simulation_state:\n
simulation_state = kw.get( \'simulation_state\'\n
, pref.getPreferredAccountingTransactionSimulationStateList()\n
)\n
if simulation_state:\n
params[\'simulation_state\'] = simulation_state\n
\n
###\n
# Get the \'section_category\' parameter\n
# Sometimes \'section_category\' is now as \'transaction_section_category\'\n
section_category = kw.get( \'transaction_section_category\'\n
, None\n
)\n
if not section_category:\n
section_category = kw.get( \'section_category\'\n
, pref.getPreferredAccountingTransactionSectionCategory()\n
)\n
if section_category:\n
params[\'section_category\'] = section_category\n
\n
###\n
# Parameters only used in reports\n
if kw.has_key(\'node_uid\'): params[\'node_uid\'] = kw[\'node_uid\']\n
\n
###\n
# Get omit parameters\n
if kw.get(\'omit_input\') : params[\'omit_input\'] = 1\n
if kw.get(\'omit_output\'): params[\'omit_output\'] = 1\n
\n
params[\'stat\'] = 1\n
\n
if kw.has_key(\'getUid\') : params[\'getUid\'] = kw[\'getUid\']\n
if kw.has_key(\'getParentUid\'): params[\'getParentUid\'] = kw[\'getParentUid\']\n
\n
###\n
# Call the query with selected parameters\n
result = context.BankAccount_zGetAccountingTransactionList(**params)\n
row = result[0]\n
\n
###\n
# Round the result to avoid float bad precision\n
# TODO: use currency precision\n
return context.Base_getRoundValue(row.quantity or 0.0, precision)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BankAccount_statSourceBalance</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -53,6 +53,7 @@
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -76,6 +77,18 @@
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_credit</string>
<string>listbox_date</string>
<string>listbox_debit</string>
<string>listbox_running_total_quantity</string>
<string>listbox_total_quantity</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
......
......@@ -11,10 +11,12 @@
<value>
<list>
<string>columns</string>
<string>domain_root_list</string>
<string>editable_columns</string>
<string>list_method</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>stat_columns</string>
<string>stat_method</string>
<string>title</string>
......@@ -96,27 +98,31 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
<string>Movement_getSpecificReference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>section_title</string>
<string>Section</string>
<string>Movement_getExplanationTitle</string>
<string>Title</string>
</tuple>
<tuple>
<string>date</string>
<string>Date</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Movement_getExplanationTranslatedPortalType</string>
<string>Type</string>
</tuple>
<tuple>
<string>specific_reference</string>
<string>Transaction Reference</string>
<string>Movement_getExplanationReference</string>
<string>Invoice Number</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Movement_getMirrorSectionTitle</string>
<string>Third Party</string>
</tuple>
<tuple>
<string>getTranslatedSimulationStateTitle</string>
<string>State</string>
</tuple>
<tuple>
......@@ -128,27 +134,47 @@
<string>Credit</string>
</tuple>
<tuple>
<string>balance</string>
<string>total_quantity</string>
<string>Balance</string>
</tuple>
<tuple>
<string>net_balance</string>
<string>Net</string>
<string>running_total_quantity</string>
<string>Running Balance</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>group</string>
<string>Group</string>
<string>function</string>
<string>function</string>
</tuple>
<tuple>
<string>project</string>
<string>project</string>
</tuple>
<tuple>
<string>date</string>
<string>date</string>
</tuple>
<tuple>
<string>debit</string>
<string>debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit</string>
</tuple>
<tuple>
<string>total_quantity</string>
<string>total_quantity</string>
</tuple>
<tuple>
<string>region</string>
<string>Region</string>
<string>running_total_quantity</string>
<string>running_total_quantity</string>
</tuple>
</list>
</value>
......@@ -194,21 +220,47 @@
<key> <string>selection_name</string> </key>
<value> <string>bank_account_transaction_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>stock.date</string>
<string>ASC</string>
</tuple>
<tuple>
<string>stock.uid</string>
<string>ASC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>None</string>
<string>sorting disabled</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>stat_columns</string> </key>
<value>
<list>
<tuple>
<string>debit</string>
<string>BankAccount_statSourceDebit</string>
<string>BankAccount_statDebit</string>
</tuple>
<tuple>
<string>credit</string>
<string>BankAccount_statSourceCredit</string>
<string>BankAccount_statCredit</string>
</tuple>
<tuple>
<string>balance</string>
<string>BankAccount_statSourceBalance</string>
<string>total_quantity</string>
<string>BankAccount_statBalance</string>
</tuple>
</list>
</value>
......
......@@ -9,12 +9,14 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_gap</string> </value>
<value> <string>listbox_credit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -50,12 +52,6 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -75,13 +71,17 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_gap</string> </value>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewReportFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......@@ -93,17 +93,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: dict([x[::-1] for x in here.Account_getGapItemList()])[here.REQUEST.get(\'gap\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_running_total_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_total_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Use_Database_Methods_Permission</string> </key>
<value>
<list>
<string>Member</string>
</list>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>getUid\r\n
getParentUid\r\n
query\r\n
omit_input\r\n
omit_output\r\n
resource_uid:list\r\n
from_date\r\n
at_date\r\n
to_date\r\n
simulation_state:list\r\n
node_uid:list\r\n
stat</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BankAccount_zGetAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-if getParentUid>\n
SELECT\n
<dtml-if stat>\n
SUM(stock.quantity) AS quantity\n
<dtml-else>\n
catalog.uid\n
, catalog.path\n
, stock.date as date\n
, section.title as section_title\n
, IF(delivery.source_section_uid = stock.section_uid,\n
catalog.source_reference,\n
catalog.destination_reference) AS specific_reference\n
, IFNULL(SUM(IF(stock.quantity > 0, stock.quantity, 0)), 0) AS debit\n
, IFNULL(SUM(IF(stock.quantity < 0, - stock.quantity, 0)), 0) AS credit\n
, - IFNULL(SUM(IF(stock.quantity < 0, - stock.quantity, 0)), 0)\n
+ IFNULL(SUM(IF(stock.quantity > 0, stock.quantity, 0)), 0) AS balance \n
</dtml-if>\n
FROM\n
movement\n
, catalog AS child\n
, catalog\n
, catalog AS node\n
, category AS node_category\n
, delivery\n
, stock\n
LEFT JOIN catalog AS section\n
ON stock.mirror_section_uid = section.uid\n
<dtml-if query>\n
, category\n
</dtml-if>\n
WHERE stock.section_uid = <dtml-var getParentUid>\n
AND stock.payment_uid = <dtml-var getUid>\n
AND delivery.uid = catalog.uid\n
AND child.uid = stock.uid\n
AND child.parent_uid = catalog.uid\n
AND movement.uid = stock.uid\n
AND movement.is_accountable = 1\n
AND node.uid = stock.node_uid\n
AND node.uid = node_category.uid\n
AND node_category.category_uid = <dtml-sqlvar\n
"portal_categories.account_type.asset.cash.bank.getUid()" type="int">\n
<dtml-if node_uid>\n
AND (\n
<dtml-in node_uid>\n
stock.node_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if resource_uid>\n
AND (\n
<dtml-in resource_uid>\n
movement.resource_uid = <dtml-sqlvar sequence-item type="int">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if from_date>\n
AND stock.date >= <dtml-sqlvar from_date type="datetime">\n
</dtml-if>\n
<dtml-if at_date>\n
AND stock.date <= <dtml-sqlvar at_date type="datetime">\n
</dtml-if>\n
<dtml-if to_date>\n
AND stock.date < <dtml-sqlvar to_date type="datetime">\n
</dtml-if>\n
<dtml-if omit_input>\n
AND stock.quantity > 0\n
</dtml-if>\n
<dtml-if omit_output>\n
AND stock.quantity < 0\n
</dtml-if>\n
<dtml-if simulation_state>\n
AND (\n
<dtml-in simulation_state>\n
catalog.simulation_state = <dtml-sqlvar sequence-item type="string">\n
<dtml-unless sequence-end> OR </dtml-unless>\n
</dtml-in>\n
)\n
</dtml-if>\n
<dtml-if query>\n
AND category.uid = stock.section_uid\n
AND <dtml-var query>\n
</dtml-if>\n
<dtml-unless stat>\n
GROUP BY catalog.uid\n
</dtml-unless>\n
ORDER BY stock.date, movement.uid\n
</dtml-if>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
try:\n
# Round the value\n
# Fortunately, the round() python method follow french fiscal rules.\n
# Exemples:\n
# 116.5049 should be rounded to 116.50\n
# 116.505 should be rounded to 116.51\n
# 116.5051 should be rounded to 116.51\n
# Please check in your country if the round() method comply with local accounting and fiscal laws.\n
rounded_value = round(value, precision)\n
\n
# Truncate the rounded value\n
trunc_value = (\'%.\' + str(precision) + \'f\') % rounded_value\n
\n
if as_string:\n
return trunc_value\n
return float(trunc_value)\n
\n
except:\n
context.log("bad convertion >>>", repr(context) + " | " + repr(value) + " | " + repr(precision))\n
return 0.0\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value, precision, as_string=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getRoundValue</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -54,9 +54,13 @@
portal = context.getPortalObject()\n
\n
params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n
getInventoryAssetPrice = portal.portal_simulation.getInventoryAssetPrice\n
getSelectionDomainDictFor = context.portal_selections.getSelectionDomainDictFor\n
\n
if asset_price:\n
getInventory = portal.portal_simulation.getInventoryAssetPrice\n
else:\n
getInventory = portal.portal_simulation.getInventory\n
\n
if kw.get(\'node_uid\'):\n
params[\'node_uid\'] = kw[\'node_uid\']\n
\n
......@@ -138,26 +142,26 @@ if period_start_date and params.get(\'node_uid\'):\n
# balance at the beginning of the period, plus debit or credit from this\n
# beginning of period to the from_date\n
at_date = params.pop(\'at_date\', None)\n
period_openning_balance = getInventoryAssetPrice(\n
period_openning_balance = getInventory(\n
selection_domain=getSelectionDomainDictFor(selection_name),\n
to_date=period_start_date,\n
**params)\n
if omit_asset_decrease:\n
return getInventoryAssetPrice(omit_asset_decrease=1,\n
return getInventory(omit_asset_decrease=1,\n
from_date=period_start_date,\n
at_date=at_date,\n
**params) + max(period_openning_balance, 0)\n
elif omit_asset_increase:\n
return getInventoryAssetPrice(omit_asset_increase=1,\n
return getInventory(omit_asset_increase=1,\n
from_date=period_start_date,\n
at_date=at_date,\n
**params) - max(-period_openning_balance, 0)\n
return getInventoryAssetPrice(\n
return getInventory(\n
from_date=period_start_date,\n
at_date=at_date,\n
**params) + period_openning_balance\n
\n
return getInventoryAssetPrice(\n
return getInventory(\n
omit_asset_increase=omit_asset_increase,\n
omit_asset_decrease=omit_asset_decrease,\n
selection_domain=getSelectionDomainDictFor(selection_name),\n
......@@ -166,7 +170,7 @@ return getInventoryAssetPrice(\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>selection=None, omit_asset_increase=0, omit_asset_decrease=0, selection_name=None, **kw</string> </value>
<value> <string>selection=None, omit_asset_increase=0, omit_asset_decrease=0, asset_price=True, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.log(\'erp5_accounting\',\n
\'InvoiceTransactionLine_getSourceItemList is a deprecated compatibility\'\n
\' alias to AccountingTransactionLine_getNodeItemList()\')\n
return context.AccountingTransactionLine_getNodeItemList()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>category_dict=None, caching_method_id=\'InvoiceTransactionLine_getSourceItemList\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InvoiceTransactionLine_getSourceItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -50,7 +50,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
<value> <string encoding="cdata"><![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import translateString\n
\n
period = state_change[\'object\']\n
......@@ -64,6 +66,18 @@ all_state_list = [x[1] for x in\n
invalid_simulation_state_list = [state for state in all_state_list\n
if state not in valid_simulation_state_list]\n
\n
if period.getParentValue().getPortalType() == \'Organisation\':\n
# if this is a "main" accounting period, we refuse to close if the previous\n
# period is not already closed.\n
for other_period in period.getParentValue().contentValues(\n
portal_type=\'Accounting Period\',\n
checked_permission=\'View\'):\n
if other_period != period and \\\n
other_period.getSimulationState() not in (\'delivered\', \'cancelled\') and\\\n
other_period.getStartDate() < period.getStartDate():\n
raise ValidationFailed(translateString(\n
"Previous accounting periods has to be closed first."))\n
\n
section = period.getParentValue()\n
while section.getPortalType() == period.getPortalType():\n
section = section.getParentValue()\n
......@@ -115,7 +129,9 @@ movement_list = portal.portal_simulation.getMovementHistoryList(\n
if movement_list:\n
raise ValidationFailed, translateString(\n
"All Accounting Transactions for this organisation during the period have to be closed first.")\n
</string> </value>
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
1508
\ No newline at end of file
1517
erp5_accounting
erp5_accounting_bbb
\ No newline at end of file
erp5_accounting
\ No newline at end of file
......@@ -71,9 +71,6 @@ request = context.REQUEST\n
gap_base = request.get("gap_base", "gap/fr/pcg/")\n
getURL = lambda gap_id: context.GAPCategory_getURLFromId(gap_id, gap_base)\n
\n
precision = context.Base_getPreferredPrecision()\n
r_ = lambda x: context.Base_getRoundValue(x, precision)\n
\n
section = context.restrictedTraverse(request.get("organisation"))\n
section_region = section.getRegion()\n
\n
......@@ -81,8 +78,8 @@ section_region = section.getRegion()\n
params = { \'omit_simulation\' : True\n
, \'simulation_state\': request.get("simulation_state", [\'stopped\', \'delivered\'])\n
, \'section_uid\' : section.getUid()\n
, \'precision\' : 2\n
, \'at_date\' : request[\'at_date\']\n
, \'where_expression\': " section.portal_type = \'Organisation\' "\n
}\n
params.update(kw)\n
\n
......@@ -134,12 +131,12 @@ for gap_id in gap_id_list:\n
\n
# Get the transaction\'s balance\n
if not region.startswith(section_region):\n
new_balance = r_(r_(new_balance) + r_(transaction.total_price)) or 0.0\n
new_balance = new_balance + transaction.total_price\n
\n
# Update the general balance\n
net_balance = r_(r_(net_balance) + r_(new_balance))\n
net_balance = net_balance + new_balance\n
\n
return r_(net_balance)\n
return net_balance\n
</string> </value>
</item>
<item>
......
26
\ No newline at end of file
27
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="iso-8859-1"?>\n
<template bottommargin=\'2cm\' showboundary=\'0\' topmargin=\'2cm\' \n
rightmargin=\'2cm\' tal:define=\'portal python:here.portal_url.getPortalObject()\' \n
filename=\'journal.pdf\' pagesize=\'A4\' allowsplitting=\'1\' landscape=\'0\' leftmargin=\'2cm\'>\n
\n
<pagetemplate startframe=\'content\' id=\'FirstPage\'>\n
<static>\n
<infostring align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n
tal:content="python: here.Localizer.erp5_ui.gettext(\'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
</pagetemplate>\n
\n
<stylesheet>\n
<paragraphstyle name="Title" parent="Normal" fontname="Helvetica-Bold" fontsize="32" align="CENTER"/>\n
<tablestyle name=\'default\'>\n
<stylecmd expr="(\'GRID\', (0,0), (-1,-1), 0.1, colors.black)"/>\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
\t <stylecmd expr="(\'LINEBELOW\', (0,0), (0,0), 0.1, colors.black)"/> \n
\t <stylecmd expr="(\'LINEBELOW\', (-3,0), (-3,0), 0.1, colors.black)"/> \n
\t <stylecmd expr="(\'LINEBEFORE\', (0,0),(0,0), 0.1, colors.black)"/>\n
\t <stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'ALIGN\', (0,0),(-1,-1), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0),(-1,-1), \'BOTTOM\')"/>\n
</tablestyle>\n
<tablestyle name=\'transaction_body\'>\n
<stylecmd expr="(\'LINEBEFORE\', (0,0),(0,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'ALIGN\', (-2,0), (-1,-1), \'RIGHT\')"/>\n
</tablestyle>\n
<tablestyle name=\'transaction_footer\'>\n
<stylecmd expr="(\'LINEBEFORE\', (0,0),(0,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'LINEAFTER\', (-3,0),(-1,0), 0.1, colors.black)"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Times-Italic\', 10)"/>\n
</tablestyle>\n
\n
<tablestyle name="top_of_page">\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 8)"/>\n
<stylecmd expr="(\'BOX\', (0,0), (-1,0), 1, colors.black)"/>\n
<stylecmd expr="(\'BOX\', (0,1), (-1,-1), 1, colors.black)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,0), (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
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'RIGHTPADDING\', (0,0), (-1,-1), 1)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 0)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 1)"/>\n
</tablestyle>\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
</stylesheet>\n
</template>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_journal_pdf_template</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PDFTemplate" module="Products.ERP5Form.PDFTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<?xml version="1.0" encoding="latin1"?>\n
<document\n
filename="journal.pdf"\n
tal:define="portal here/portal_url/getPortalObject;\n
transaction_list here/AccountingTransactionModule_getJournalAccountingTransactionList;\n
precision here/Base_getPreferredPrecision">\n
<title>Journal</title>\n
<author>ERP5</author>\n
<subject>Journal</subject>\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
<tr rowheight="0.512cm">\n
<td colwidth="12cm">Account Title</td>\n
<td colwidth="2.5cm">Debit</td>\n
<td colwidth="2.5cm">Credit</td>\n
</tr>\n
</table>\n
<tal:block tal:repeat="transaction python:transaction_list[:-1]">\n
<table style="transaction_header" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.5cm">\n
<td colwidth="4.5cm"/>\n
<td colwidth="3cm" tal:content="transaction/date">Date</td>\n
<td colwidth="4.5cm"/>\n
<td colwidth="2.5cm"/>\n
<td colwidth="2.5cm"/>\n
</tr>\n
</table>\n
\n
<tal:block tal:repeat="line transaction/lines">\n
<table style="transaction_body" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr rowheight="0.512cm">\n
<tal:block tal:condition="not:line/debtor">\n
<td colwidth="2cm"/>\n
</tal:block>\n
<td colwidth="modified"\n
tal:attributes="colwidth python: line[\'debtor\'] and \'12cm\' or \'10cm\' ;" tal:content="python:line[\'account_name\']"/>\n
<td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and here.Base_getRoundValue(line[\'amount\'], precision) or \' \' "/>\n
<td colwidth="2.5cm" tal:content="python:line[\'debtor\'] and \' \' or here.Base_getRoundValue(line[\'amount\'], precision) "/>\n
</tr>\n
</table>\n
</tal:block>\n
\n
<table style="transaction_footer" splitbyrow="1" repeatrows="0" repeatcols="0">\n
<tr>\n
<td colwidth="0.5cm"/>\n
<td colwidth="11.5cm" tal:content="transaction/description"/>\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
\t\t\t<!--\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
\t\t\t-->\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
\t\t\t\t\t<td colwidth="0.5cm"/>\n
<td colwidth="11.5cm" > Total </td>\n
<td colwidth="2.5cm" tal:content="python: here.Base_getRoundValue(transaction_list[-1][\'journal_total_debit\' ], precision) "/>\n
<td colwidth="2.5cm" tal:content="python: here.Base_getRoundValue(transaction_list[-1][\'journal_total_credit\'], precision) "/>\n
</tr>\n
</table>\n
</tal:block>\n
</content>\n
</document>\n
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_viewJournalAsPdf</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>pdf_stylesheet</string> </key>
<value> <string>AccountingTransactionModule_journal_pdf_template</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
20
\ No newline at end of file
21
\ No newline at end of file
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
706
\ No newline at end of file
707
\ No newline at end of file
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
498
\ No newline at end of file
499
\ No newline at end of file
......@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,10 @@ if engaged_budget:\n
portal.getPortalCurrentInventoryStateList() +\n
portal.getPortalTransitInventoryStateList())\n
\n
kw.setdefault(\'simulation_state\', portal.getPortalCurrentInventoryStateList())\n
# those are simulation state parameters equivalent to getCurrentInventoryQuery that can be passed to getMovementHistoryList\n
kw.setdefault(\'simulation_state\', portal.getPortalCurrentInventoryStateList() + portal.getPortalTransitInventoryStateList())\n
kw.setdefault(\'transit_simulation_state\', portal.getPortalTransitInventoryStateList())\n
kw.setdefault(\'omit_transit\', False)\n
\n
return kw\n
</string> </value>
......
......@@ -352,8 +352,8 @@
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>SaleOrder_getFormattedTotalPrice</string>
......@@ -364,7 +364,7 @@
<string>Order Date</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
......@@ -382,6 +382,10 @@
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -392,6 +396,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -426,6 +436,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -454,6 +468,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -517,8 +535,8 @@
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>SaleOrder_getFormattedTotalPrice</string>
......@@ -529,7 +547,7 @@
<string>Date</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
......@@ -545,9 +563,15 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Sale Orders</string> </value>
<value> <string>My Orders</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
......@@ -560,7 +584,7 @@
<value>
<list>
<tuple>
<string>id</string>
<string>reference</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
<tuple>
......@@ -572,7 +596,7 @@
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_simulation_state_title</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
</list>
......@@ -586,10 +610,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -106,7 +106,7 @@
<key> <string>default</string> </key>
<value> <string encoding="cdata"><![CDATA[
<h2>Sale Order Details</h2>
<h2>Order Details</h2>
]]></string> </value>
</item>
......
......@@ -72,7 +72,7 @@
website here/getWebSiteValue">\n
\n
<p class="article">\n
<span><span tal:replace="python: here.Base_translateString(\'You are logged as\')"/> <span tal:replace="customer/getTitle"/></span>\n
<span><span tal:replace="python: here.Base_translateString(\'You are logged as\')"/> <span tal:replace="customer/getTitle | string:Unknown User"/></span>\n
</p>\n
<a class="articlelink" \n
tal:attributes="href python: \'%s/sale_order_module/SaleOrderModule_viewAsWebSaleOrderList\' % website.absolute_url()">\n
......@@ -89,8 +89,7 @@
<br/>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
......
......@@ -58,8 +58,7 @@
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
......
......@@ -27,7 +27,10 @@
<item>
<key> <string>transitions</string> </key>
<value>
<tuple/>
<tuple>
<string>delete</string>
<string>delete_action</string>
</tuple>
</value>
</item>
<item>
......
1268
\ No newline at end of file
1269
\ No newline at end of file
......@@ -55,20 +55,31 @@ SearchableText</string> </value>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
REPLACE INTO\n
DELETE FROM\n
full_text\n
WHERE\n
<dtml-in uid>\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n
;\n
<dtml-var "\'\\0\'"><dtml-let document_list="[]">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "SearchableText[loop_item]">\n
<dtml-call expr="document_list.append(loop_item)">\n
</dtml-if>\n
</dtml-in>\n
<dtml-if expr="_.len(document_list) > 0">\n
INSERT INTO\n
full_text\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-in prefix="loop" expr="document_list">\n
( \n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="SearchableText[loop_item]" type="string" optional>\n
)\n
<dtml-if sequence-end>\n
<dtml-else>\n
,\n
</dtml-if>\n
</dtml-in>\n
)<dtml-unless sequence-end>,</dtml-unless>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>
]]></string> </value>
</item>
......
5
\ No newline at end of file
6
\ No newline at end of file
......@@ -116,7 +116,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getObject().InvoiceTransactionLine_getSourceItemList()</string> </value>
<value> <string>python:cell.getObject().AccountingTransactionLine_getNodeItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
181
\ No newline at end of file
182
\ No newline at end of file
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_accounting_bbb</string> </value>
<value> <string>jqzoom</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
2013-01-21 rafael
* The initial commit
\ No newline at end of file
2013 (c) Nexedi SA
\ No newline at end of file
erp5_jquery
\ No newline at end of file
This Business Template contains only static files of jqzoom plugin.
\ No newline at end of file
GPL
\ No newline at end of file
rafael
\ No newline at end of file
1
\ No newline at end of file
portal_skins/erp5_jquery/jquery/plugin/jqzoom
portal_skins/erp5_jquery/jquery/plugin/jqzoom/**
\ No newline at end of file
erp5_jquery_plugin_jqzoom
\ No newline at end of file
5.4.7
\ No newline at end of file
2013-01-21 rafael
* The initial commit
\ No newline at end of file
2013 (c) Nexedi SA
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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