Commit acffa000 authored by Mame Coumba Sall's avatar Mame Coumba Sall

2009-05-28 mame

*improve script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27236 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a434a494
......@@ -90,10 +90,7 @@ for line in kw.get(\'listbox\'):\n
\n
if line.has_key("variation_category_list") and line[\'variation_category_list\'] not in(\'\',[]):\n
cell_found = None\n
for cell in context.getCellValueList(base_id=\'movement\'):\n
if cell.getVariationCategoryList() == line["variation_category_list"]:\n
cell_found = cell\n
break\n
cell_found = context.getCell(base_id=\'movement\', *line["variation_category_list"])\n
if cell_found is not None:\n
movement_to_update = cell_found\n
else:\n
......@@ -118,10 +115,6 @@ for line in kw.get(\'listbox\'):\n
movement_to_update.setAggregateValueSet(\n
movement_to_update.getAggregateValueList() + [item])\n
if update_quantity:\n
if item.getQuantityUnit() != movement_to_update.getQuantityUnit():\n
raise NotImplementedError(\n
\'Quantity unit from the movement differs from quantity\'\n
\' unit on the item\')\n
movement_to_update.setQuantity(\n
movement_to_update.getQuantity() + item.getQuantity())\n
\n
......@@ -187,12 +180,10 @@ return context.Base_redirect(form_id, keep_items=dict(\n
<string>module</string>
<string>item</string>
<string>cell_found</string>
<string>cell</string>
<string>movement_to_update</string>
<string>_apply_</string>
<string>movement_to_update</string>
<string>variation_category_list</string>
<string>variation</string>
<string>NotImplementedError</string>
</tuple>
</value>
</item>
......
140
\ No newline at end of file
143
\ No newline at end of file
Internal Packing List Line | item_creation
Internal Packing List Line | pagel_item_fast_input
Internal Packing List Line | select_item_fast_input
Internal Packing List | aggregate_item
Item Module | create_order
......
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