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 ...@@ -96,6 +96,22 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n
# if not context.Baobab_checkCounterOpened(site):\n # if not context.Baobab_checkCounterOpened(site):\n
# msg = Message(domain = "ui", message="Counter is not opened")\n # msg = Message(domain = "ui", message="Counter is not opened")\n
# raise ValidationFailed, (msg,)\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> </string> </value>
</item> </item>
<item> <item>
...@@ -158,6 +174,12 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n ...@@ -158,6 +174,12 @@ transaction.Baobab_checkCounterDateOpen(site=source, date=date)\n
<string>x</string> <string>x</string>
<string>len</string> <string>len</string>
<string>at_date</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> </tuple>
</value> </value>
</item> </item>
......
...@@ -74,11 +74,19 @@ ...@@ -74,11 +74,19 @@
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<tuple> <tuple>
<string>Auditor</string> <string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
<string>Reviewer</string> <string>Reviewer</string>
<string>Assistant</string> </tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -94,11 +102,11 @@ ...@@ -94,11 +102,11 @@
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<tuple> <tuple>
<string>Auditor</string> <string>Assignee</string>
<string>Assignor</string>
<string>Assistant</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
<string>Reviewer</string> <string>Reviewer</string>
<string>Assistant</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -82,10 +82,20 @@ ...@@ -82,10 +82,20 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Assistant</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
<string>Reviewer</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> </tuple>
</value> </value>
</item> </item>
...@@ -106,10 +116,10 @@ ...@@ -106,10 +116,10 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Assistant</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
<string>Reviewer</string> <string>Reviewer</string>
<string>Assistant</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -74,20 +74,30 @@ ...@@ -74,20 +74,30 @@
<key> <string>Access contents information</string> </key> <key> <string>Access contents information</string> </key>
<value> <value>
<tuple> <tuple>
<string>Manager</string>
<string>Assistant</string>
<string>Assignor</string> <string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Reviewer</string> <string>Reviewer</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Modify portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple> <tuple>
<string>Manager</string> <string>Assignor</string>
<string>Assistant</string> <string>Assistant</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -95,9 +105,9 @@ ...@@ -95,9 +105,9 @@
<key> <string>View</string> </key> <key> <string>View</string> </key>
<value> <value>
<tuple> <tuple>
<string>Manager</string>
<string>Assistant</string>
<string>Assignor</string> <string>Assignor</string>
<string>Assistant</string>
<string>Manager</string>
<string>Reviewer</string> <string>Reviewer</string>
</tuple> </tuple>
</value> </value>
......
...@@ -127,6 +127,14 @@ if debit_required:\n ...@@ -127,6 +127,14 @@ if debit_required:\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value> <value> <string>state_change, **kw</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
......
...@@ -80,13 +80,17 @@ ...@@ -80,13 +80,17 @@
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Delete objects</string> </key> <key> <string>Delete objects</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -79,7 +79,9 @@ ...@@ -79,7 +79,9 @@
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -79,13 +79,17 @@ ...@@ -79,13 +79,17 @@
<item> <item>
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>Delete objects</string> </key> <key> <string>Delete objects</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Manager</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
331 332
\ No newline at end of file \ 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