[Erp5-report] r25374 - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_a...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 30 10:46:20 CET 2009
Author: jerome
Date: Fri Jan 30 10:46:19 2009
New Revision: 25374
URL: http://svn.erp5.org?rev=25374&view=rev
Log:
Introduce new scripts to calculate total debit / total credit on an accounting transaction using getMovementList, not SQL call, and use those scripts to show debit and credit on accounting module when debit/credit is not set on the brain, like it happens in list workflow dialog. Also remove the scripts that were previously used here only.
Removed:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml
Removed: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml?rev=25373&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceCredit.xml (removed)
@@ -1,155 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
- <tuple/>
- </tuple>
- </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 = context.portal_selections.getSelectionParamsFor(selection_name)\n
-\n
-params[\'stat\'] = 1\n
-params[\'omit_input\'] = 1\n
-params[\'omit_output\'] = 0\n
-\n
-if params.get(\'operation_date\', {}).get(\'query\'):\n
- buildSQLQuery = context.portal_catalog.buildSQLQuery\n
- params[\'source_section_where_expression\'] = buildSQLQuery(\n
- **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
- params[\'destination_section_where_expression\'] = buildSQLQuery(\n
- **{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
- del params[\'operation_date\']\n
-\n
-result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
- selection=selection,\n
- selection_params=params, **params)\n
-row = result[0]\n
-return float(\'%.02f\' % (row.total_price and - row.total_price or 0.0))\n
-# vim: syntax=python\n
-</string> </value>
- </item>
- <item>
- <key> <string>_code</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string>selection=None, selection_name=None, **kw</string> </value>
- </item>
- <item>
- <key> <string>errors</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>func_code</string> </key>
- <value>
- <object>
- <klass>
- <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>co_argcount</string> </key>
- <value> <int>2</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>selection</string>
- <string>selection_name</string>
- <string>kw</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>params</string>
- <string>_write_</string>
- <string>buildSQLQuery</string>
- <string>_getitem_</string>
- <string>_apply_</string>
- <string>result</string>
- <string>row</string>
- <string>float</string>
- </tuple>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>func_defaults</string> </key>
- <value>
- <tuple>
- <none/>
- <none/>
- </tuple>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>AccountingTransactionModule_statSourceCredit</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml?rev=25373&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_statSourceDebit.xml (removed)
@@ -1,154 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
- <tuple/>
- </tuple>
- </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 = context.portal_selections.getSelectionParamsFor(selection_name)\n
-\n
-params[\'stat\'] = 1\n
-params[\'omit_output\'] = 1\n
-params[\'omit_input\'] = 0\n
-\n
-if params.get(\'operation_date\', {}).get(\'query\'):\n
- buildSQLQuery = context.portal_catalog.buildSQLQuery\n
- params[\'source_section_where_expression\'] = buildSQLQuery(\n
- **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
- params[\'destination_section_where_expression\'] = buildSQLQuery(\n
- **{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
- del params[\'operation_date\']\n
-\n
-result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
- selection=selection, selection_params = params, **params)\n
-row = result[0]\n
-return float(\'%.02f\' % (row.total_price or 0.0))\n
-# vim: syntax=python\n
-</string> </value>
- </item>
- <item>
- <key> <string>_code</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string>selection=None, selection_name=None, **kw</string> </value>
- </item>
- <item>
- <key> <string>errors</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>func_code</string> </key>
- <value>
- <object>
- <klass>
- <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>co_argcount</string> </key>
- <value> <int>2</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>selection</string>
- <string>selection_name</string>
- <string>kw</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>params</string>
- <string>_write_</string>
- <string>buildSQLQuery</string>
- <string>_getitem_</string>
- <string>_apply_</string>
- <string>result</string>
- <string>row</string>
- <string>float</string>
- </tuple>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>func_defaults</string> </key>
- <value>
- <tuple>
- <none/>
- <none/>
- </tuple>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>AccountingTransactionModule_statSourceDebit</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
More information about the Erp5-report
mailing list