[Erp5-report] r28779 - in /erp5/trunk/bt5/erp5_banking_core: SkinTemplateItem/portal_skins/...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 3 13:55:57 CEST 2009


Author: vincent
Date: Thu Sep  3 13:55:54 2009
New Revision: 28779

URL: http://svn.erp5.org?rev=28779&view=rev
Log:
Factorise code used to know if a bank account is opened.

Added:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_isOpened.xml
Modified:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml
    erp5/trunk/bt5/erp5_banking_core/bt/revision

Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml?rev=28779&r1=28778&r2=28779&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkAvailableBalance.xml [utf8] Thu Sep  3 13:55:54 2009
@@ -72,7 +72,6 @@
 # returns a dictionnary like : {\'error_code\', \'balance\'}\n
 \n
 #workflow_id = \'bank_account_workflow\'\n
-workflow_correct_state_list = (\'valid\', \'being_modified\', \'validating_modification\')\n
 manual_validation_account_category_list = (\'test\',)\n
 \n
 # First check that the payment account is in an acceptable state\n
@@ -80,7 +79,7 @@
 payment_value = context.restrictedTraverse(payment)\n
 payment_state = payment_value.getValidationState()\n
 \n
-if payment_state not in workflow_correct_state_list :\n
+if not context.BankAccount_isOpened():\n
   return {\'error_code\':2} # closed account\n
 \n
 resource = payment_value.getPriceCurrencyValue()\n
@@ -163,7 +162,6 @@
                             <string>payment</string>
                             <string>quantity</string>
                             <string>src__</string>
-                            <string>workflow_correct_state_list</string>
                             <string>manual_validation_account_category_list</string>
                             <string>_getattr_</string>
                             <string>context</string>

Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml?rev=28779&r1=28778&r2=28779&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_checkBalance.xml [utf8] Thu Sep  3 13:55:54 2009
@@ -70,14 +70,13 @@
 # check that the amount of `resource` in account `payment` is greater than or equal to `quantity`\n
 # returns a dictionnary like : {\'error_code\', \'balance\'}\n
 \n
-workflow_correct_state_list = (\'valid\', \'being_modified\', \'validating_modification\')\n
 manual_validation_account_category_list = (\'test\',)\n
 \n
 # First check that the payment account is in an acceptable state\n
 payment_value = context.restrictedTraverse(payment)\n
 payment_state = payment_value.getValidationState()\n
 \n
-if payment_state not in workflow_correct_state_list :\n
+if not context.BankAcocunt_isOpened():\n
   return {\'error_code\':2} # closed account\n
 \n
 resource = payment_value.getPriceCurrencyValue()\n
@@ -156,7 +155,6 @@
                             <string>payment</string>
                             <string>quantity</string>
                             <string>src__</string>
-                            <string>workflow_correct_state_list</string>
                             <string>manual_validation_account_category_list</string>
                             <string>_getattr_</string>
                             <string>context</string>

Added: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_isOpened.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_isOpened.xml?rev=28779&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_isOpened.xml (added)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BankAccount_isOpened.xml [utf8] Thu Sep  3 13:55:54 2009
@@ -1,0 +1,146 @@
+<?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>return context.getValidationState() in (\'valid\', \'being_modified\', \'validating_modification\')\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></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>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>_getattr_</string>
+<string>context</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>BankAccount_isOpened</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/bt/revision?rev=28779&r1=28778&r2=28779&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] Thu Sep  3 13:55:54 2009
@@ -1,1 +1,1 @@
-490
+489




More information about the Erp5-report mailing list