Commit cccdfcb0 authored by Sebastien Robin's avatar Sebastien Robin

- there was some security problems because of some logs into checkbook_reception_workflow.

- in check payment, reject must go back to draft instead of planned

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14613 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3c7dc789
......@@ -76,8 +76,11 @@ for line in context.getMovementList():\n
for aggregate_uid in line.getAggregateUidList():\n
if aggregate_uid not in aggregate_uid_list:\n
aggregate_value = context.portal_catalog(uid=aggregate_uid)[0].getObject()\n
reference = aggregate_value.getReference()\n
if reference is None:\n
reference = \'%s - %s\' % (aggregate_value.getReferenceRangeMin() or \'\', aggregate_value.getReferenceRangeMax() or \'\')\n
msg = Message(domain="ui", message="Sorry, the item with reference $reference is not available any more",\n
mapping={\'reference\':aggregate_value.getReference()})\n
mapping={\'reference\':reference})\n
raise ValidationFailed, (msg,)\n
</string> </value>
</item>
......@@ -145,6 +148,8 @@ for line in context.getMovementList():\n
<string>aggregate_uid</string>
<string>_getitem_</string>
<string>aggregate_value</string>
<string>reference</string>
<string>None</string>
<string>msg</string>
</tuple>
</value>
......
......@@ -45,6 +45,12 @@
<tuple/>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -48,6 +48,12 @@
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -73,11 +73,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -86,7 +83,7 @@
<key> <string>roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</tuple>
</value>
......
......@@ -53,7 +53,7 @@
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>planned</string> </value>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
......
......@@ -63,11 +63,8 @@ Base_viewWorklist?simulation_state=planned&portal_type=Check Payment&simulation_
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Guard</string>
<string>Guard</string>
</tuple>
<none/>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -88,17 +85,14 @@ Base_viewWorklist?simulation_state=planned&portal_type=Check Payment&simulation_
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
......@@ -121,7 +115,7 @@ Base_viewWorklist?simulation_state=planned&portal_type=Check Payment&simulation_
<key> <string>simulation_state</string> </key>
<value>
<tuple>
<string>planned</string>
<string>draft</string>
</tuple>
</value>
</item>
......
......@@ -141,12 +141,10 @@ def checkReferenceListUniqueness(reference_list, model, destination_payment_uid)
"""\n
Check each given reference not to already exist.\n
"""\n
context.log(\'query\', portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, resource_relative_url=model, src__=1))\n
if destination_payment_uid is None:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, resource_relative_url=model)\n
else:\n
match_list = portal.portal_catalog(portal_type=\'Check\', reference=reference_list, destination_payment_uid=destination_payment_uid, resource_relative_url=model)\n
context.log(\'len\', len(match_list))\n
assertReferenceMatchListEmpty(match_list)\n
for reference in reference_list:\n
tag = \'check_%s_%s_%s\' % (model, destination_payment_uid, reference)\n
......
254
\ No newline at end of file
256
\ 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