Commit 2d7a3823 authored by Sebastien Robin's avatar Sebastien Robin

- money deposit should block the action of closing the couter date only in the

confirmed state
- allow to disable the check of the current date when closing the counter date,
this is enabled by default, but usefull to disable it in unit test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 51193bc3
......@@ -104,6 +104,8 @@ if site_uid is not None:\n
(simulation_state in (\'stopped\') and site_url in document.getDestination()))\n
):\n
continue\n
if portal_type in (\'Money Deposit\',) and simulation_state not in (\'confirmed\',):\n
continue\n
append(document)\n
\n
def operation_sort(a,b):\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>delete</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delete_action</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignor</string>
<string>Assignee</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -92,7 +92,8 @@ start_date = counter_date.getStartDate()\n
from DateTime import DateTime\n
now = DateTime()\n
\n
if now.Date() != start_date.Date():\n
check_date_is_today = state_change.kwargs.get(\'check_date_is_today\', 1)\n
if check_date_is_today and now.Date() != start_date.Date():\n
msg = Message(domain=\'ui\',message="Sorry, the date is not today")\n
raise ValidationFailed (msg,)\n
\n
......@@ -188,6 +189,7 @@ counter_date.setReference(reference)\n
<string>start_date</string>
<string>DateTime</string>
<string>now</string>
<string>check_date_is_today</string>
<string>line</string>
<string>context</string>
<string>counter</string>
......
418
\ No newline at end of file
419
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment