diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingCashSortingCell_getBaobabDestination.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingCashSortingCell_getBaobabDestination.xml index cd50cf126752170a43c76bdb39c40e1c415e08fc..9a5bfc15cb251013de4588b3dd299da0f4eeb054 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingCashSortingCell_getBaobabDestination.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingCashSortingCell_getBaobabDestination.xml @@ -68,19 +68,23 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string># context.log(\'context = %s, cash status = %s\' %(context, context.getCashStatus(),), \'source = %s\'%(context.getSource().split(\'/\')))\n + <value> <string>if context.getSource() is None:\n + return None\n +\n +site = context.Baobab_getVaultSite(context.getSource()).getRelativeUrl()\n +\n if context.getCashStatus() == \'to_sort\' or context.getCashStatus() == \'cancelled\' and context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList():\n # remaining banknote which are not sorted yet, or cancelled one\n if not \'ventilation\' in context.getSource():\n - return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(\'/\'.join(context.getSource().split(\'/\')[:3]),)\n + return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(site,)\n else:\n # take classification into account here\n source_list = context.getSource().split(\'/\')\n - return \'%s/caveau/auxiliaire/%s\' %(\'/\'.join(source_list[:3]),\'/\'.join(source_list[-2:]))\n + return \'%s/caveau/auxiliaire/%s\' %(site,\'/\'.join(source_list[-2:]))\n elif context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList():\n - return \'%s/caveau/reserve/encaisse_des_billets_et_monnaies\' %(\'/\'.join(context.getSource().split(\'/\')[:3]),)\n + return \'%s/caveau/reserve/encaisse_des_billets_et_monnaies\' %(site,)\n else:\n - return \'%s/caveau/externes/encaisse_des_externes\' %(\'/\'.join(context.getSource().split(\'/\')[:3]),)\n + return \'%s/caveau/externes/encaisse_des_externes\' %(site,)\n </string> </value> </item> <item> @@ -137,8 +141,10 @@ else:\n <string>kw</string> <string>_getattr_</string> <string>context</string> - <string>_getitem_</string> + <string>None</string> + <string>site</string> <string>source_list</string> + <string>_getitem_</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_cash/bt/change_log b/bt5/erp5_banking_cash/bt/change_log index 4bc919d8b680ba7061ab69da11358f53fba1c124..0688daf31f2943c46da94ad5dddb84409a2884f1 100644 --- a/bt5/erp5_banking_cash/bt/change_log +++ b/bt5/erp5_banking_cash/bt/change_log @@ -1,3 +1,6 @@ +2006-07-05 aurel +* fix getBaobabDestination for cash sorting cell + 2006-06-17 Seb * Added Monetary Destruction * Added Cash Balance Regulation