[Erp5-report] r19267 - in /erp5/trunk/bt5/erp5_banking_core: WorkflowTemplateItem/portal_wo...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 12 12:26:07 CET 2008
Author: aurel
Date: Tue Feb 12 12:26:06 2008
New Revision: 19267
URL: http://svn.erp5.org?rev=19267&view=rev
Log:
do not allow to opened multiple accouting date
Modified:
erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_date_workflow/scripts/checkOpenPossible.xml
erp5/trunk/bt5/erp5_banking_core/bt/revision
Modified: erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_date_workflow/scripts/checkOpenPossible.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_date_workflow/scripts/checkOpenPossible.xml?rev=19267&r1=19266&r2=19267&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_date_workflow/scripts/checkOpenPossible.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/accounting_date_workflow/scripts/checkOpenPossible.xml Tue Feb 12 12:26:06 2008
@@ -65,7 +65,9 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string># Check that it is possible to open the accounting date.\n
+ <value> <string encoding="cdata"><![CDATA[
+
+# Check that it is possible to open the accounting date.\n
\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n
@@ -79,7 +81,14 @@
if site_uid is None:\n
msg = Message(domain=\'ui\',message="Sorry, the site is not defined")\n
raise ValidationFailed (msg,)\n
-</string> </value>
+\n
+opened_date_list = accounting_date.portal_catalog(portal_type="Accounting Date", simulation_state="opened", default_site_uid=accounting_date.getSiteUid())\n
+if len(opened_date_list) > 0:\n
+ msg = Message(domain=\'ui\',message="Sorry, another accounting date is already opened")\n
+ raise ValidationFailed (msg,)\n
+
+
+]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
@@ -134,6 +143,8 @@
<string>site_uid</string>
<string>None</string>
<string>msg</string>
+ <string>opened_date_list</string>
+ <string>len</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_banking_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/bt/revision?rev=19267&r1=19266&r2=19267&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision Tue Feb 12 12:26:06 2008
@@ -1,1 +1,1 @@
-417
+418
More information about the Erp5-report
mailing list