[Erp5-report] r15452 - in /erp5/trunk/bt5/erp5_banking_cash: PortalTypePropertySheetTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 3 14:47:05 CEST 2007


Author: seb
Date: Fri Aug  3 14:47:04 2007
New Revision: 15452

URL: http://svn.erp5.org?rev=15452&view=rev
Log:
modifications on cash movement in order to take into account currencies wich are sent outside the bank

Added:
    erp5/trunk/bt5/erp5_banking_cash/PropertySheetTemplateItem/CashMovement.py
    erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view/my_currency_handover.xml
Modified:
    erp5/trunk/bt5/erp5_banking_cash/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
    erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view.xml
    erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateDestinationCounterDate.xml
    erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateVaultBalance.xml
    erp5/trunk/bt5/erp5_banking_cash/bt/revision
    erp5/trunk/bt5/erp5_banking_cash/bt/template_portal_type_property_sheet_list
    erp5/trunk/bt5/erp5_banking_cash/bt/template_property_sheet_id_list

Modified: erp5/trunk/bt5/erp5_banking_cash/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/PortalTypePropertySheetTemplateItem/property_sheet_list.xml?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/PortalTypePropertySheetTemplateItem/property_sheet_list.xml (original)
+++ erp5/trunk/bt5/erp5_banking_cash/PortalTypePropertySheetTemplateItem/property_sheet_list.xml Fri Aug  3 14:47:04 2007
@@ -12,6 +12,7 @@
   <item>Amount</item>
  </portal_type>
  <portal_type id="Cash Movement">
+  <item>CashMovement</item>
   <item>Price</item>
  </portal_type>
  <portal_type id="Cash Sorting">

Added: erp5/trunk/bt5/erp5_banking_cash/PropertySheetTemplateItem/CashMovement.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/PropertySheetTemplateItem/CashMovement.py?rev=15452&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/PropertySheetTemplateItem/CashMovement.py (added)
+++ erp5/trunk/bt5/erp5_banking_cash/PropertySheetTemplateItem/CashMovement.py Fri Aug  3 14:47:04 2007
@@ -1,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+class CashMovement:
+    """
+        PropertySheetTemplate properties for all ERP5 objects
+    """
+
+    _properties = (
+        {   'id'          : 'currency_handover',
+            'description' : 'If we send currency ressources outside',
+            'type'        : 'boolean',
+            'mode'        : 'w' },
+    )
+  
+

Modified: erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view.xml?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view.xml (original)
+++ erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view.xml Fri Aug  3 14:47:04 2007
@@ -110,6 +110,7 @@
                         <string>my_source</string>
                         <string>my_resource</string>
                         <string>my_source_total_asset_price</string>
+                        <string>my_currency_handover</string>
                       </list>
                     </value>
                 </item>

Added: erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view/my_currency_handover.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view/my_currency_handover.xml?rev=15452&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view/my_currency_handover.xml (added)
+++ erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovement_view/my_currency_handover.xml Fri Aug  3 14:47:04 2007
@@ -1,0 +1,177 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_currency_handover</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Currency Handover</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateDestinationCounterDate.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateDestinationCounterDate.xml?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateDestinationCounterDate.xml (original)
+++ erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateDestinationCounterDate.xml Fri Aug  3 14:47:04 2007
@@ -72,8 +72,9 @@
 \n
 vaultDestination = transaction.getDestination()\n
 \n
-# check again that we are in the good accounting date in site destination\n
-transaction.Baobab_checkCounterDateOpen(site=vaultDestination, date=transaction.getStopDate())\n
+if not transaction.isCurrencyHandover():\n
+  # check again that we are in the good accounting date in site destination\n
+  transaction.Baobab_checkCounterDateOpen(site=vaultDestination, date=transaction.getStopDate())\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateVaultBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateVaultBalance.xml?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateVaultBalance.xml (original)
+++ erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/cash_movement_workflow/scripts/validateVaultBalance.xml Fri Aug  3 14:47:04 2007
@@ -75,6 +75,19 @@
 vault = transaction.getSource()\n
 vaultDestination = transaction.getDestination()\n
 \n
+if transaction.isCurrencyHandover() and vaultDestination is not None:\n
+  msg = Message(domain="ui", \n
+         message="Sorry, you must not set a destination in case of currency handover.")\n
+  raise ValidationFailed, (msg,)\n
+\n
+if vault is None:\n
+  msg = Message(domain="ui", \n
+         message="Sorry, you must define a source.")\n
+  raise ValidationFailed, (msg,)\n
+\n
+if not transaction.isCurrencyHandover() and vaultDestination is not None:\n
+  msg = Message(domain="ui", \n
+         message="Sorry, you must define a destination.")\n
 \n
 # use of the constraint : Test source and destination\n
 vliste = transaction.checkConsistency()\n
@@ -164,17 +177,17 @@
                             <string>_getattr_</string>
                             <string>vault</string>
                             <string>vaultDestination</string>
+                            <string>None</string>
+                            <string>msg</string>
                             <string>vliste</string>
                             <string>len</string>
                             <string>portal_type_with_no_space</string>
                             <string>getattr</string>
-                            <string>None</string>
                             <string>check_path_script</string>
                             <string>message</string>
                             <string>resource</string>
                             <string>amount</string>
                             <string>total_price</string>
-                            <string>msg</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_banking_cash/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/revision?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/revision Fri Aug  3 14:47:04 2007
@@ -1,1 +1,1 @@
-455
+457

Modified: erp5/trunk/bt5/erp5_banking_cash/bt/template_portal_type_property_sheet_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/template_portal_type_property_sheet_list?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/template_portal_type_property_sheet_list (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/template_portal_type_property_sheet_list Fri Aug  3 14:47:04 2007
@@ -6,6 +6,7 @@
 Cash Exchange | Price
 Cash Exchange | Resource
 Cash Exchange | Simulation
+Cash Movement | CashMovement
 Cash Movement | Price
 Cash Sorting | Price
 Cash To Currency Purchase | Amount

Modified: erp5/trunk/bt5/erp5_banking_cash/bt/template_property_sheet_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/template_property_sheet_id_list?rev=15452&r1=15451&r2=15452&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/template_property_sheet_id_list (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/template_property_sheet_id_list Fri Aug  3 14:47:04 2007
@@ -1,1 +1,2 @@
-MonetaryDestruction
+MonetaryDestruction
+CashMovement




More information about the Erp5-report mailing list