Commit df00fcd7 authored by Aurel's avatar Aurel

many changes like workflow security, fast input parameters...

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17557 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 357896b6
...@@ -82,7 +82,7 @@ if currency != \'XOF\':\n ...@@ -82,7 +82,7 @@ if currency != \'XOF\':\n
emissionLetter = [\'not_defined\']\n emissionLetter = [\'not_defined\']\n
variation = [\'not_defined\']\n variation = [\'not_defined\']\n
else:\n else:\n
cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'error\']\n cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'mutilated\',\'error\']\n
emissionLetter = None\n emissionLetter = None\n
variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
\n \n
......
...@@ -83,7 +83,7 @@ if currency != \'XOF\':\n ...@@ -83,7 +83,7 @@ if currency != \'XOF\':\n
emissionLetter = [\'not_defined\',]\n emissionLetter = [\'not_defined\',]\n
variation = [\'not_defined\',]\n variation = [\'not_defined\',]\n
else:\n else:\n
cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'error\']\n cashStatus = [\'valid\', \'cancelled\', \'to_sort\', \'new_emitted\',\'mutilated\',\'error\']\n
emissionLetter = None\n emissionLetter = None\n
variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
\n \n
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Incoming Cash Sorting Line\'\n <value> <string>cash_detail_dict = {\'line_portal_type\' : \'Incoming Cash Sorting Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n , \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : [\'to_sort\',]\n , \'cash_status_list\' : [\'to_sort\',\'valid\',\'cancelled\',]\n
, \'emission_letter_list\' : [\'not_defined\',\'mixed\']\n , \'emission_letter_list\' : [\'not_defined\',\'mixed\']\n
, \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n , \'variation_list\' : context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
, \'currency_cash_portal_type\': None\n , \'currency_cash_portal_type\': None\n
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n <value> <string>cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n , \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID()\n
, \'cash_status_list\' : [\'valid\']\n , \'cash_status_list\' : [\'valid\', \'new_not_emitted\', \'new_emitted\', \'not_defined\', \'cancelled\']\n
, \'emission_letter_list\' : None\n , \'emission_letter_list\' : None\n
#, \'emission_letter_list\' : # context.Baobab_getUserEmissionLetterList()\n #, \'emission_letter_list\' : # context.Baobab_getUserEmissionLetterList()\n
, \'variation_list\' : context.Baobab_getResourceVintageList(coin=1, banknote=1)\n , \'variation_list\' : context.Baobab_getResourceVintageList(coin=1, banknote=1)\n
......
...@@ -76,35 +76,43 @@ if listbox is None:\n ...@@ -76,35 +76,43 @@ if listbox is None:\n
container_list = []\n container_list = []\n
listbox = []\n listbox = []\n
#context.log("tracking list", context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node))\n #context.log("tracking list", context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node))\n
resource_translated_title_dict = {}\n
total_price_dict = {}\n
listbox_append = listbox.append\n
for o in context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node):\n for o in context.portal_simulation.getCurrentTrackingList(at_date= reference_date, node = node):\n
cash_container = o.getObject()\n cash_container = o.getObject()\n
\n
if cash_container.getParentValue().getPortalType() in container_portal_type_list:\n if cash_container.getParentValue().getPortalType() in container_portal_type_list:\n
# get one line in order to know some properties of the cash container\n # get one line in order to know some properties of the cash container\n
container_dict = {}\n container_dict = {}\n
container_lines = cash_container.searchFolder(portal_type=\'Container Line\')\n container_lines = cash_container.objectValues(portal_type=\'Container Line\')\n
if len(container_lines) == 0:\n if len(container_lines) == 0:\n
context.log("MonetaryIssue_generateCashContainerInputDialog", "No container line find for cash container %s" %(cash_container.getRelativeUrl(),))\n context.log("MonetaryIssue_generateCashContainerInputDialog", "No container line find for cash container %s" %(cash_container.getRelativeUrl(),))\n
continue\n continue\n
container_line = container_lines[0].getObject()\n container_line = container_lines[0]\n
container_dict[\'reference\'] = cash_container.getReference()\n container_dict[\'reference\'] = cash_container.getReference()\n
container_dict[\'cash_number_range_start\'] = cash_container.getCashNumberRangeStart()\n container_dict[\'cash_number_range_start\'] = cash_container.getCashNumberRangeStart()\n
container_dict[\'cash_number_range_stop\'] = cash_container.getCashNumberRangeStop()\n container_dict[\'cash_number_range_stop\'] = cash_container.getCashNumberRangeStop()\n
container_dict[\'resource_translated_title\'] = container_line.getResourceTranslatedTitle()\n resource = container_line.getResource()\n
container_dict[\'quantity\'] = container_line.getQuantity()\n resource_translated_title = resource_translated_title_dict.get(resource, None)\n
container_dict[\'total_price\'] = container_line.getTotalPrice()\n if resource_translated_title is None:\n
resource_translated_title = container_line.getResourceTranslatedTitle()\n
resource_translated_title_dict[resource] = resource_translated_title\n
container_dict[\'resource_translated_title\'] = resource_translated_title\n
quantity = container_line.getQuantity()\n
container_dict[\'quantity\'] = quantity\n
total_price = total_price_dict.get((quantity,resource), None)\n
if total_price is None:\n
total_price = container_line.getTotalPrice()\n
total_price_dict[(quantity,resource)] = total_price\n
container_dict[\'total_price\'] = total_price\n
container_dict[\'selection\'] = 0\n container_dict[\'selection\'] = 0\n
container_dict[\'date\'] = o.date\n container_dict[\'date\'] = o.date\n
container_dict[\'uid\'] = \'new_%s\' %(cash_container.getUid(),) #cash_container.getReference().replace(\'/\', \'_\'),)\n container_dict[\'uid\'] = \'new_%s\' %(cash_container.getUid(),) #cash_container.getReference().replace(\'/\', \'_\'),)\n
\n \n
listbox.append(container_dict)\n listbox_append(container_dict)\n
\n \n
def sort_listbox(a,b):\n
result = cmp(a[\'date\'],b[\'date\'])\n
if result == 0:\n
result = cmp(a[\'reference\'],b[\'reference\'])\n
return result\n
\n \n
listbox.sort(sort_listbox)\n
\n \n
context.Base_updateDialogForm(listbox=listbox\n context.Base_updateDialogForm(listbox=listbox\n
)\n )\n
...@@ -171,6 +179,9 @@ if listbox is None:\n ...@@ -171,6 +179,9 @@ if listbox is None:\n
<string>node</string> <string>node</string>
<string>reference_date</string> <string>reference_date</string>
<string>container_list</string> <string>container_list</string>
<string>resource_translated_title_dict</string>
<string>total_price_dict</string>
<string>listbox_append</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>o</string> <string>o</string>
<string>cash_container</string> <string>cash_container</string>
...@@ -180,7 +191,10 @@ if listbox is None:\n ...@@ -180,7 +191,10 @@ if listbox is None:\n
<string>_getitem_</string> <string>_getitem_</string>
<string>container_line</string> <string>container_line</string>
<string>_write_</string> <string>_write_</string>
<string>sort_listbox</string> <string>resource</string>
<string>resource_translated_title</string>
<string>quantity</string>
<string>total_price</string>
<string>_apply_</string> <string>_apply_</string>
</tuple> </tuple>
</value> </value>
......
...@@ -313,14 +313,16 @@ def split_lines(CD_file_line_list):\n ...@@ -313,14 +313,16 @@ def split_lines(CD_file_line_list):\n
# check reference doesn\'t already exist for this resource\n # check reference doesn\'t already exist for this resource\n
movement_container_list = context.portal_catalog(portal_type = "Cash Container Item",\n movement_container_list = context.portal_catalog(portal_type = "Cash Container Item",\n
reference = line_container_id,\n reference = line_container_id,\n
destination_uid = destination_uid,\n default_destination_uid = destination_uid,\n
simulation_state = "!=cancelled")\n simulation_state = "!=cancelled")\n
# if we find container line with same reference, we must\n # if we find container line with same reference, we must\n
# check the resource defined on line\n # check the resource defined on line\n
for same_container in movement_container_list:\n for same_container in movement_container_list:\n
same_container = same_container.getObject()\n same_container = same_container.getObject()\n
for o in same_container.objectValues():\n for o in same_container.objectValues():\n
if o.getResourceUid() == resourve_value.getUid():\n if o.getResourceUid() == resource_value.getUid():\n
#context.log("same containter exist %s" %(o.getPath(), "AURELXXX"))\n
# raise ValueError, "same containter exist %s" %(o.getPath(),)\n
return {\'error\':True, \'message\':message_dict[\'03\'], \'head_dict\':{}}\n return {\'error\':True, \'message\':message_dict[\'03\'], \'head_dict\':{}}\n
\n \n
\n \n
...@@ -460,6 +462,7 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del ...@@ -460,6 +462,7 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del
<string>create_movement</string> <string>create_movement</string>
<string>split_head</string> <string>split_head</string>
<string>destination_uid</string> <string>destination_uid</string>
<string>resource_value</string>
<string>split_lines</string> <string>split_lines</string>
<string>None</string> <string>None</string>
<string>request</string> <string>request</string>
...@@ -470,7 +473,6 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del ...@@ -470,7 +473,6 @@ return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'del
<string>ValueError</string> <string>ValueError</string>
<string>destination</string> <string>destination</string>
<string>destination_value</string> <string>destination_value</string>
<string>resource_value</string>
<string>split_line_result_dict</string> <string>split_line_result_dict</string>
</tuple> </tuple>
</value> </value>
......
...@@ -72,11 +72,9 @@ ...@@ -72,11 +72,9 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>DestinationAssignee</string> <string>Assistant</string>
<string>DestinationAssignor</string>
<string>Manager</string> <string>Manager</string>
<string>Reviewer</string> <string>Reviewer</string>
<string>Assistant</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -102,11 +100,9 @@ ...@@ -102,11 +100,9 @@
<tuple> <tuple>
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>DestinationAssignee</string> <string>Assistant</string>
<string>DestinationAssignor</string>
<string>Manager</string> <string>Manager</string>
<string>Reviewer</string> <string>Reviewer</string>
<string>Assistant</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -29,6 +29,12 @@ ...@@ -29,6 +29,12 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>deleted</string> </value> <value> <string>deleted</string> </value>
</item> </item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Deleted</string> </value> <value> <string>Deleted</string> </value>
...@@ -48,4 +54,51 @@ ...@@ -48,4 +54,51 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<key> <string>Add portal content</string> </key> <key> <string>Add portal content</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
...@@ -96,6 +97,7 @@ ...@@ -96,6 +97,7 @@
<key> <string>Modify portal content</string> </key> <key> <string>Modify portal content</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string> <string>Owner</string>
</tuple> </tuple>
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<value> <value>
<tuple> <tuple>
<string>Assignor</string> <string>Assignor</string>
<string>Assignee</string>
<string>Manager</string> <string>Manager</string>
</tuple> </tuple>
</value> </value>
......
533 534
\ 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