[Erp5-report] r16901 - in /erp5/trunk/bt5/erp5_banking_check: WorkflowTemplateItem/portal_w...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 9 13:38:59 CEST 2007


Author: seb
Date: Tue Oct  9 13:38:58 2007
New Revision: 16901

URL: http://svn.erp5.org?rev=16901&view=rev
Log:
check the life time of items

Modified:
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/scripts/validatePositionAccounting.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/delivered.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/draft.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/started.xml
    erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/stopped.xml
    erp5/trunk/bt5/erp5_banking_check/bt/revision

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_deposit_workflow/scripts/validateConsistency.xml Tue Oct  9 13:38:58 2007
@@ -125,20 +125,26 @@
     raise ValidationFailed, (msg,)\n
 \n
   # Test check is valid based on date\n
-  if \'compte\' in check_operation_line.getAggregateResourceTitle():\n
-    interval = getIntervalBetweenDates(check_operation_line.getStartDate(), check_operation_line.getStopDate())\n
-    if interval[\'year\'] >= 3:\n
-      if interval[\'month\'] > 0 or interval["day"] > 0:\n
-        msg = Message(domain=\'ui\', message="Check $check is more than 3 years old.",\n
-                      mapping={"check" : check_operation_line.getAggregateFreeText()})\n
-        raise ValidationFailed, (msg,)\n
-  elif \'virement\' in check_operation_line.getAggregateResourceTitle():\n
-    interval = getIntervalBetweenDates(check_operation_line.getStartDate(), check_operation_line.getStopDate())\n
-    if interval[\'month\'] >= 3:\n
-      if interval["day"] > 0:\n
-        msg = Message(domain=\'ui\', message="Check $check is more than 3 month old.",\n
-                      mapping={"check" : check_operation_line.getAggregateFreeText()})\n
-        raise ValidationFailed, (msg,)\n
+  transaction.Check_checkIntervalBetweenDate(resource=check_operation_line.getAggregateResourceValue(),\n
+                                             start_date=check_operation_line.getStartDate(),\n
+                                             stop_date=check_operation_line.getStopDate(),\n
+                                             check_nb=check_operation_line.getAggregateFreeText())\n
+\n
+#   \n
+#   if \'compte\' in check_operation_line.getAggregateResourceTitle():\n
+#     interval = getIntervalBetweenDates(check_operation_line.getStartDate(), check_operation_line.getStopDate())\n
+#     if interval[\'year\'] >= 3:\n
+#       if interval[\'month\'] > 0 or interval["day"] > 0:\n
+#         msg = Message(domain=\'ui\', message="Check $check is more than 3 years old.",\n
+#                       mapping={"check" : check_operation_line.getAggregateFreeText()})\n
+#         raise ValidationFailed, (msg,)\n
+#   elif \'virement\' in check_operation_line.getAggregateResourceTitle():\n
+#     interval = getIntervalBetweenDates(check_operation_line.getStartDate(), check_operation_line.getStopDate())\n
+#     if interval[\'month\'] >= 3:\n
+#       if interval["day"] > 0:\n
+#         msg = Message(domain=\'ui\', message="Check $check is more than 3 month old.",\n
+#                       mapping={"check" : check_operation_line.getAggregateFreeText()})\n
+#         raise ValidationFailed, (msg,)\n
     \n
   \n
   # Test if the account balance is sufficient.\n
@@ -241,7 +247,6 @@
                             <string>check_number</string>
                             <string>check_type</string>
                             <string>source_bank_account</string>
-                            <string>interval</string>
                             <string>context</string>
                             <string>error</string>
                             <string>check</string>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow.xml Tue Oct  9 13:38:58 2007
@@ -62,6 +62,7 @@
                 <string>View</string>
                 <string>Access contents information</string>
                 <string>Modify portal content</string>
+                <string>Delete objects</string>
               </tuple>
             </value>
         </item>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/scripts/validatePositionAccounting.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/scripts/validatePositionAccounting.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/scripts/validatePositionAccounting.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/scripts/validatePositionAccounting.xml Tue Oct  9 13:38:58 2007
@@ -73,6 +73,9 @@
 transaction = state_change[\'object\']\n
 \n
 date = transaction.getStartDate()\n
+from DateTime import DateTime\n
+now = DateTime()\n
+\n
 source = transaction.getSource(None)\n
 if source is None:\n
   msg = Message(domain=\'ui\', message=\'No counter defined.\')\n
@@ -96,7 +99,7 @@
                           resource=aggregate_resource)\n
 if len(check_list)>0:\n
   # First make sure there is no delivery line\n
-  line_list = transaction.objectValues(portal_type=\'Cash Delivery Line\')\n
+  line_list = transaction.objectValues(portal_type=\'Checkbook Delivery Line\')\n
   if len(line_list)>0:\n
     id_list = [x.getId() for x in line_list]\n
     transaction.manage_delObjects(ids=id_list)\n
@@ -134,6 +137,13 @@
     if item.getSimulationState()!=\'confirmed\':\n
       msg = Message(domain = "ui", message="Sorry, this check is not issued")\n
       raise ValidationFailed, (msg,)\n
+    # Test check is valid based on date\n
+    transaction.Check_checkIntervalBetweenDate(resource=item.getResourceValue(),\n
+                                             start_date=date,\n
+                                             stop_date=now,\n
+                                             check_nb=item.getTitle())\n
+\n
+\n
 debit_required = transaction.isDebitRequired()\n
 if total_debit in (None,0.0) and debit_required:\n
   msg = Message(domain = "ui", message="Sorry, you forgot to give the amount")\n
@@ -236,6 +246,8 @@
                             <string>transaction</string>
                             <string>_getattr_</string>
                             <string>date</string>
+                            <string>DateTime</string>
+                            <string>now</string>
                             <string>None</string>
                             <string>source</string>
                             <string>msg</string>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml Tue Oct  9 13:38:58 2007
@@ -54,17 +54,14 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Persistence</string>
-          <string>PersistentMapping</string>
-        </tuple>
-        <none/>
+        <global name="PersistentMapping" module="Persistence.mapping"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
-            <key> <string>_container</string> </key>
+            <key> <string>data</string> </key>
             <value>
               <dictionary>
                 <item>
@@ -75,6 +72,12 @@
                         <string>Manager</string>
                         <string>Owner</string>
                       </tuple>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>Delete objects</string> </key>
+                    <value>
+                      <tuple/>
                     </value>
                 </item>
                 <item>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/delivered.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/delivered.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/delivered.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/delivered.xml Tue Oct  9 13:38:58 2007
@@ -74,6 +74,12 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>Delete objects</string> </key>
+                    <value>
+                      <tuple/>
+                    </value>
+                </item>
+                <item>
                     <key> <string>Modify portal content</string> </key>
                     <value>
                       <tuple>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/draft.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/draft.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/draft.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/draft.xml Tue Oct  9 13:38:58 2007
@@ -81,6 +81,16 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>Delete objects</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Assignee</string>
+                        <string>Assignor</string>
+                        <string>Manager</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
                     <key> <string>Modify portal content</string> </key>
                     <value>
                       <tuple>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/started.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/started.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/started.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/started.xml Tue Oct  9 13:38:58 2007
@@ -77,6 +77,14 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>Delete objects</string> </key>
+                    <value>
+                      <tuple>
+                        <string>Manager</string>
+                      </tuple>
+                    </value>
+                </item>
+                <item>
                     <key> <string>Modify portal content</string> </key>
                     <value>
                       <tuple>

Modified: erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/stopped.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/stopped.xml?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/stopped.xml (original)
+++ erp5/trunk/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/stopped.xml Tue Oct  9 13:38:58 2007
@@ -77,6 +77,12 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>Delete objects</string> </key>
+                    <value>
+                      <tuple/>
+                    </value>
+                </item>
+                <item>
                     <key> <string>Modify portal content</string> </key>
                     <value>
                       <tuple>

Modified: erp5/trunk/bt5/erp5_banking_check/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_check/bt/revision?rev=16901&r1=16900&r2=16901&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_check/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_check/bt/revision Tue Oct  9 13:38:58 2007
@@ -1,1 +1,1 @@
-328
+329




More information about the Erp5-report mailing list