[Erp5-report] r13976 - in /erp5/trunk/bt5/erp5_banking_check: SkinTemplateItem/portal_skins...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 5 15:22:14 CEST 2007
Author: seb
Date: Thu Apr 5 15:22:11 2007
New Revision: 13976
URL: http://svn.erp5.org?rev=13976&view=rev
Log:
Added generic script in order to check check and checkbook stock values. Use this script for checkbook usual cash transfer.
Added:
erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.xml
Modified:
erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_usual_cash_transfer_workflow/scripts/validateCheckbookVaultTransferConsistency.xml
erp5/trunk/bt5/erp5_banking_check/bt/revision
Added: erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.xml?rev=13976&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.xml (added)
+++ erp5/trunk/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckbookDelivery_checkAggregateStockList.xml Thu Apr 5 15:22:11 2007
@@ -1,0 +1,174 @@
+<?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>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </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>current_tracking_list = [x.getObject() for x in context.portal_simulation.getCurrentTrackingList(\n
+ at_date=at_date, node=node_url,\n
+ where_expression="item_catalog.portal_type=\'Check\' or item_catalog.portal_type=\'Checkbook\'")]\n
+aggregate_uid_list = [x.uid for x in current_tracking_list]\n
+for line in context.getMovementList():\n
+ for aggregate_uid in line.getAggregateUidList():\n
+ if aggregate_uid not in aggregate_uid_list:\n
+ aggregate_value = context.portal_catalog(uid=aggregate_uid)[0].getObject()\n
+ msg = Message(domain="ui", message="Sorry, the item with reference $reference is not available any more",\n
+ mapping={\'reference\':aggregate_value.getReference()})\n
+ raise ValidationFailed, (msg,)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>node_url=None, at_date=None</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>node_url</string>
+ <string>at_date</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>_getattr_</string>
+<string>context</string>
+ <string>x</string>
+ <string>current_tracking_list</string>
+ <string>aggregate_uid_list</string>
+ <string>line</string>
+ <string>aggregate_uid</string>
+ <string>_getitem_</string>
+ <string>aggregate_value</string>
+ <string>Message</string>
+ <string>msg</string>
+ <string>ValidationFailed</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>CheckbookDelivery_checkAggregateStockList</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_usual_cash_transfer_workflow/scripts/validateCheckbookVaultTransferConsistency.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_usual_cash_transfer_workflow/scripts/validateCheckbookVaultTransferConsistency.xml?rev=13976&r1=13975&r2=13976&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_usual_cash_transfer_workflow/scripts/validateCheckbookVaultTransferConsistency.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_usual_cash_transfer_workflow/scripts/validateCheckbookVaultTransferConsistency.xml Thu Apr 5 15:22:11 2007
@@ -83,15 +83,8 @@
msg = Message(domain="ui", message="Sorry, you must select at least one check or checkbook")\n
\n
baobab_source = transaction.getBaobabSource()\n
-reference_date = transaction.getStartDate()\n
-current_tracking_list = [x.getObject() for x in transaction.portal_simulation.getCurrentTrackingList(\n
- at_date=reference_date, node=baobab_source,\n
- where_expression="item_catalog.portal_type=\'Check\' or item_catalog.portal_type=\'Checkbook\'")]\n
-aggregate_uid_list = [x.uid for x in current_tracking_list]\n
-for line in transaction.getMovementList(portal_type=\'Checkbook Delivery Line\'):\n
- for aggregate_uid in line.getAggregateUidList():\n
- if aggregate_uid not in aggregate_uid_list:\n
- msg = Message(domain="ui", message="Sorry, an item is not available any more")\n
+at_date = transaction.getStartDate()\n
+context.CheckbookDelivery_checkAggregateStockList(at_date=at_date, node_url = baobab_source)\n
\n
if msg is not None:\n
raise ValidationFailed, (msg,)\n
@@ -151,15 +144,8 @@
<string>line_list</string>
<string>len</string>
<string>baobab_source</string>
- <string>reference_date</string>
- <string>append</string>
- <string>$append0</string>
- <string>_getiter_</string>
- <string>x</string>
- <string>current_tracking_list</string>
- <string>aggregate_uid_list</string>
- <string>line</string>
- <string>aggregate_uid</string>
+ <string>at_date</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_banking_check/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/bt/revision?rev=13976&r1=13975&r2=13976&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_check/bt/revision Thu Apr 5 15:22:11 2007
@@ -1,1 +1,1 @@
-145
+148
More information about the Erp5-report
mailing list