Commit 8e3d1a46 authored by Aurel's avatar Aurel

2006-06-06 aurel

* fix delete of objects and bug when using currency with not all variation in fast input save script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7622 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ded66d30
......@@ -95,7 +95,7 @@ base_category_list = (\'emission_letter\', \'cash_status\', \'variation\')\n
per_resource_dict = {}\n
\n
# remove previous line\n
old_line = [x.getObject() for x in context.searchFolder(portal_type=[\'Cash Delivery Line\',])]\n
old_line = [x.getObject() for x in context.searchFolder(portal_type=[line_portal_type,])]\n
if len(old_line)>0:\n
for object_list in old_line:\n
context.deleteContent(object_list.getId())\n
......@@ -110,15 +110,33 @@ for line in listbox:\n
# get variation for the cell\n
if column_base_category == \'cash_status\':\n
movement[\'cash_status\'] = "cash_status/%s" %cash_status_list[counter-1]\n
if line.has_key(\'emission_letter\'):\n
movement[\'emission_letter\'] = "emission_letter/%s" %line[\'emission_letter\']\n
else:\n
movement[\'emission_letter\'] = "emission_letter/not_defined" %line[\'emission_letter\']\n
if line.has_key(\'variation\'):\n
movement[\'variation\'] = "variation/%s" %line[\'variation\']\n
else:\n
movement[\'variation\'] = "variation/not_defined"\n
elif column_base_category == \'emission_letter\':\n
if line.has_key(\'cash_status\'):\n
movement[\'cash_status\'] = "cash_status/%s" %line[\'cash_status\']\n
else:\n
movement[\'cash_status\'] = "cash_status/not_defined"\n
movement[\'emission_letter\'] = "emission_letter/%s" %emission_letter_list[counter-1]\n
if line.has_key(\'variation\'):\n
movement[\'variation\'] = "variation/%s" %line[\'variation\']\n
else:\n
movement[\'variation\'] = "variation/not_defined"\n
else:\n
if line.has_key(\'cash_status\'):\n
movement[\'cash_status\'] = "cash_status/%s" %line[\'cash_status\']\n
else:\n
movement[\'cash_status\'] = "cash_status/not_defined"\n
if line.has_key(\'emission_letter\'):\n
movement[\'emission_letter\'] = "emission_letter/%s" %line[\'emission_letter\']\n
else:\n
movement[\'emission_letter\'] = "emission_letter/not_defined"\n
movement[\'variation\'] = "variation/%s" %variation_list[counter-1]\n
# generate a key based on variation\n
# this will allow us to check if there is multiple line for the same resource + variation\n
......
2006-06-06 aurel
* fix delete of objects and bug when using currency with not all variation in fast input save script
2006-06-05 aurel
* complete rewrite of the script that save the fast input for delivery
......
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