[Erp5-report] r24585 - in /erp5/trunk/bt5/erp5_banking_cash: WorkflowTemplateItem/portal_wo...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 13 16:14:06 CET 2008
Author: aurel
Date: Thu Nov 13 16:14:03 2008
New Revision: 24585
URL: http://svn.erp5.org?rev=24585&view=rev
Log:
auxiliary agency can not do dematerialization
Modified:
erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/monetary_destruction_workflow/scripts/validateVaultBalance.xml
erp5/trunk/bt5/erp5_banking_cash/bt/revision
Modified: erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/monetary_destruction_workflow/scripts/validateVaultBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/monetary_destruction_workflow/scripts/validateVaultBalance.xml?rev=24585&r1=24584&r2=24585&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/monetary_destruction_workflow/scripts/validateVaultBalance.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_cash/WorkflowTemplateItem/portal_workflow/monetary_destruction_workflow/scripts/validateVaultBalance.xml [utf8] Thu Nov 13 16:14:03 2008
@@ -90,21 +90,6 @@
msg = Message(domain="ui", message="Invalid Foreign Agency.")\n
raise ValidationFailed, (msg,)\n
\n
-if "principale" not in vault:\n
- site = transaction.getSourceSection()\n
- if site in (None, ""):\n
- msg = Message(domain="ui", message="You must select a foreign agency.")\n
- raise ValidationFailed, (msg,)\n
- source_country = transaction.Baobab_getCountryForSite(transaction.getSource())\n
- site_country = transaction.Baobab_getCountryForSite(site)\n
- if \'encaisse_des_externes\' in vault and \\\n
- site_country == source_country:\n
- msg = Message(domain="ui", message="You must select an agency from a foreign country.") \n
- raise ValidationFailed, (msg,)\n
- elif \'encaisse_des_billets_retires_de_la_circulation\' in vault and \\\n
- site_country != source_country: \n
- msg = Message(domain="ui", message="You must select an agency from the same country.") \n
- raise ValidationFailed, (msg,)\n
\n
# In case of dematerialization, we must have only coins\n
if transaction.isDematerialization():\n
@@ -113,6 +98,11 @@
msg = Message(domain="ui", message="Sorry, dematerialization is possible only with coins.")\n
raise ValidationFailed, (msg,)\n
\n
+ # Not possible from auxiliary agency\n
+ if \'auxiliaire\' in vault:\n
+ msg = Message(domain="ui", message="You can\'t do this operation on auxiliary site.")\n
+ raise ValidationFailed, (msg,)\n
+ \n
# Also we must make sure that the source_section is defined\n
source_section = transaction.getSourceSection()\n
if source_section is None:\n
@@ -126,7 +116,23 @@
if source_section in source_object.getPath():\n
msg = Message(domain="ui", message="You can\'t used this site.")\n
raise ValidationFailed, (msg,)\n
- \n
+# Check specific for auxiliary agencies\n
+elif "principale" not in vault: \n
+ site = transaction.getSourceSection()\n
+ if site in (None, ""):\n
+ msg = Message(domain="ui", message="You must select a foreign agency.")\n
+ raise ValidationFailed, (msg,)\n
+ source_country = transaction.Baobab_getCountryForSite(transaction.getSource())\n
+ site_country = transaction.Baobab_getCountryForSite(site)\n
+ if \'encaisse_des_externes\' in vault and \\\n
+ site_country == source_country:\n
+ msg = Message(domain="ui", message="You must select an agency from a foreign country.") \n
+ raise ValidationFailed, (msg,)\n
+ elif \'encaisse_des_billets_retires_de_la_circulation\' in vault and \\\n
+ site_country != source_country: \n
+ msg = Message(domain="ui", message="You must select an agency from the same country.") \n
+ raise ValidationFailed, (msg,)\n
+\n
\n
# Get price and total_price.\n
amount = transaction.getSourceTotalAssetPrice()\n
@@ -201,11 +207,11 @@
<string>msg</string>
<string>source_section</string>
<string>None</string>
+ <string>_getiter_</string>
+ <string>line</string>
<string>site</string>
<string>source_country</string>
<string>site_country</string>
- <string>_getiter_</string>
- <string>line</string>
<string>amount</string>
<string>total_price</string>
<string>resource</string>
Modified: erp5/trunk/bt5/erp5_banking_cash/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_cash/bt/revision?rev=24585&r1=24584&r2=24585&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_cash/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_cash/bt/revision [utf8] Thu Nov 13 16:14:03 2008
@@ -1,1 +1,1 @@
-651
+652
More information about the Erp5-report
mailing list