Commit 381281eb authored by Aurel's avatar Aurel

update security so that banking operation line can be created in wf transition

by seb : fix checkbook delivery worklfow

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2c6c9a6b
......@@ -96,6 +96,22 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n
# if not context.Baobab_checkCounterOpened(site):\n
# msg = Message(domain = "ui", message="Counter is not opened")\n
# raise ValidationFailed, (msg,)\n
\n
# Check that all checks are in draft\n
line_list = transaction.getMovementList()\n
\n
for line in line_list:\n
aggregate_list = line.getAggregateValueList()\n
for aggregate in aggregate_list:\n
if aggregate.getValidationState() != \'draft\':\n
message = Message(domain=\'ui\', message=\'Sorry, the checkbook is not new\')\n
raise ValidationFailed, (message,)\n
if aggregate.getPortalType()==\'Checkbook\':\n
for check in aggregate.objectValues(portal_type=\'Check\'):\n
if check.getSimulationState() != \'draft\':\n
message = Message(domain=\'ui\',\n
message=\'Sorry, there is a check wich is not in the new state inside the checkbook\')\n
raise ValidationFailed, (message,)\n
</string> </value>
</item>
<item>
......@@ -158,6 +174,12 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n
<string>x</string>
<string>len</string>
<string>at_date</string>
<string>line_list</string>
<string>line</string>
<string>aggregate_list</string>
<string>aggregate</string>
<string>message</string>
<string>check</string>
</tuple>
</value>
</item>
......
......@@ -74,11 +74,19 @@
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Auditor</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Owner</string>
<string>Reviewer</string>
<string>Assistant</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
......@@ -94,11 +102,11 @@
<key> <string>View</string> </key>
<value>
<tuple>
<string>Auditor</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Owner</string>
<string>Reviewer</string>
<string>Assistant</string>
</tuple>
</value>
</item>
......
......@@ -82,10 +82,20 @@
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Owner</string>
<string>Reviewer</string>
<string>Assistant</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
......@@ -106,10 +116,10 @@
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Owner</string>
<string>Reviewer</string>
<string>Assistant</string>
</tuple>
</value>
</item>
......
......@@ -74,20 +74,30 @@
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assistant</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
</tuple>
</value>
</item>
......@@ -95,9 +105,9 @@
<key> <string>View</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Assistant</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Reviewer</string>
</tuple>
</value>
......
......@@ -127,6 +127,14 @@ if debit_required:\n
<key> <string>_params</string> </key>
<value> <string>state_change, **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>
<value>
......
......@@ -80,13 +80,17 @@
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......
......@@ -79,7 +79,9 @@
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......
......@@ -79,13 +79,17 @@
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Delete objects</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......
331
\ No newline at end of file
332
\ 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