[Erp5-report] r8541 - in /erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_wor...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 19 11:26:33 CEST 2006


Author: aurel
Date: Wed Jul 19 11:26:30 2006
New Revision: 8541

URL: http://svn.erp5.org?rev=8541&view=rev
Log:
modify workflow to use new script to check counter date and couter

Modified:
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validatePositionAccounting.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml?rev=8541&r1=8540&r2=8541&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml Wed Jul 19 11:26:30 2006
@@ -81,7 +81,7 @@
 \n
   # Get a checkbook for this bank account.\n
   checkbook = None\n
-  generic_model = context.portal_catalog(portal_type = \'Checkbook Model\', title = \'Generic\')[0].getObject()\n
+  generic_model = context.portal_catalog(portal_type = \'Checkbook Model\', id = \'generic_checkbook\')[0].getObject()\n
   # XXX it would be better to use a related key for this, but z_related_resource is too specific to\n
   # movement at the moment.\n
   for brain in context.portal_catalog(portal_type = \'Checkbook\',\n
@@ -119,6 +119,12 @@
             <key> <string>_code</string> </key>
             <value>
               <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
             </value>
         </item>
         <item>
@@ -211,4 +217,25 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validatePositionAccounting.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validatePositionAccounting.xml?rev=8541&r1=8540&r2=8541&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validatePositionAccounting.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validatePositionAccounting.xml Wed Jul 19 11:26:30 2006
@@ -79,23 +79,13 @@
   raise ValidationFailed, (msg,)\n
 \n
 # check we are in an opened accounting day\n
-if not transaction.Baobab_checkCounterDateOpen(site=source, date=transaction.getStartDate()):\n
+if not transaction.Baobab_checkCounterDateOpen(site=source, date=date):\n
   msg = Message(domain = "ui", message="Counter Date is not opened")\n
   raise ValidationFailed, (msg,)\n
 \n
 site = transaction.getSourceValue()\n
-while True:\n
-  if not hasattr(site, \'getVaultTypeList\'):\n
-    msg = Message(domain = \'ui\', message = \'The site value is misconfigured; report this to system administrators.\')\n
-    raise ValidationFailed, (msg,)\n
-  if \'site\' in site.getVaultTypeList():\n
-    break\n
-  site = site.getParentValue()\n
-\n
-# check that the counter is opened\n
-counter_list = [x.getObject() for x in transaction.portal_catalog(portal_type="Counter", simulation_state = \'open\', site_uid = site.getUid())]\n
-\n
-if len(counter_list) == 0:\n
+\n
+if not context.Baobab_checkCounterOpened(site):\n
   msg = Message(domain = "ui", message="Counter is not opened")\n
   raise ValidationFailed, (msg,)\n
 \n
@@ -192,14 +182,6 @@
                             <string>source</string>
                             <string>msg</string>
                             <string>site</string>
-                            <string>True</string>
-                            <string>hasattr</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>_getiter_</string>
-                            <string>x</string>
-                            <string>counter_list</string>
-                            <string>len</string>
                             <string>context</string>
                             <string>line</string>
                             <string>bank_account</string>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml?rev=8541&r1=8540&r2=8541&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml Wed Jul 19 11:26:30 2006
@@ -116,6 +116,7 @@
         item.setQuantity(line.getPrice())\n
         item.setPriceCurrency(line.getPriceCurrency())\n
       item.setDestinationPayment(line.getDestinationPayment())\n
+      item.setDestinationTrade(line.getDestinationTrade())\n
       item.setResourceValue(resource)\n
       aggregate_list.append(item)\n
 \n




More information about the Erp5-report mailing list