[Erp5-report] r28757 - in /erp5/trunk/bt5/erp5_banking_cash: SkinTemplateItem/portal_skins/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 2 17:59:17 CEST 2009
Author: vincent
Date: Wed Sep 2 17:59:12 2009
New Revision: 28757
URL: http://svn.erp5.org?rev=28757&view=rev
Log:
Coins don't have the same constraints on destination that banknotes have.
Modified:
erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_getBaobabDestination.xml
erp5/trunk/bt5/erp5_banking_cash/bt/revision
Modified: erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_getBaobabDestination.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_getBaobabDestination.xml?rev=28757&r1=28756&r2=28757&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_getBaobabDestination.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_getBaobabDestination.xml [utf8] Wed Sep 2 17:59:12 2009
@@ -70,11 +70,29 @@
context.log(source, destination)\n
if source is None or destination is None:\n
return None\n
-if source.split("/")[-1] == destination.split("/")[-1] or "transit" not in source:\n
+\n
+has_banknote = 0\n
+has_coin = 0\n
+\n
+for movement in context.getMovementList():\n
+ resource_portal_type = movement.getResourceValue().getPortalType()\n
+ if resource_portal_type == \'Coin\':\n
+ has_coin = 1\n
+ break\n
+ elif resource_portal_type == \'Banknote\':\n
+ has_banknote = 1\n
+ break\n
+\n
+if has_banknote == 1:\n
+ if source.split("/")[-1] == destination.split("/")[-1] or "transit" not in source:\n
+ destination = "%s/caveau/serre/encaisse_des_billets_neufs_non_emis" % destination\n
+ else:\n
+ destination = "%s/caveau/serre/encaisse_des_billets_neufs_non_emis_en_transit_allant_a/%s" % (destination, source.split("/")[-1])\n
+elif has_coin == 1:\n
destination = "%s/caveau/serre/encaisse_des_billets_neufs_non_emis" % destination\n
else:\n
- destination = "%s/caveau/serre/encaisse_des_billets_neufs_non_emis_en_transit_allant_a/%s" % (destination, source.split("/")[-1])\n
- \n
+ destination = None\n
+\n
return destination\n
</string> </value>
</item>
@@ -99,6 +117,14 @@
<item>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
+ </item>
+ <item>
+ <key> <string>_proxy_roles</string> </key>
+ <value>
+ <tuple>
+ <string>Manager</string>
+ </tuple>
+ </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -131,6 +157,11 @@
<string>source</string>
<string>destination</string>
<string>None</string>
+ <string>has_banknote</string>
+ <string>has_coin</string>
+ <string>_getiter_</string>
+ <string>movement</string>
+ <string>resource_portal_type</string>
<string>_getitem_</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_banking_cash/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/revision?rev=28757&r1=28756&r2=28757&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/revision [utf8] Wed Sep 2 17:59:12 2009
@@ -1,1 +1,1 @@
-670
+672
More information about the Erp5-report
mailing list