Commit d43a3807 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix a bug that bogus variation category can be left for created lines.

add a comment for further improvement.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24582 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6cd1b774
...@@ -470,6 +470,8 @@ class OrderBuilder(XMLObject, Amount, Predicate): ...@@ -470,6 +470,8 @@ class OrderBuilder(XMLObject, Amount, Predicate):
parent._duplicate(parent.manage_copyObjects(ids=ids))[0], parent._duplicate(parent.manage_copyObjects(ids=ids))[0],
(delivery, old_delivery_line.getId()), {}, CopyError) (delivery, old_delivery_line.getId()), {}, CopyError)
delivery_line = delivery[cp['new_id']] delivery_line = delivery[cp['new_id']]
# reset variation category list
delivery_line.setVariationCategoryList([])
# delete non-split movements # delete non-split movements
keep_id_list = [y.getDeliveryValue().getId() for y in \ keep_id_list = [y.getDeliveryValue().getId() for y in \
movement_group.getMovementList()] movement_group.getMovementList()]
...@@ -482,6 +484,8 @@ class OrderBuilder(XMLObject, Amount, Predicate): ...@@ -482,6 +484,8 @@ class OrderBuilder(XMLObject, Amount, Predicate):
delivery_line.edit(**property_dict) delivery_line.edit(**property_dict)
# Update variation category list on line # Update variation category list on line
# XXX updating variation category list should be also handled by
# MovementGroup
line_variation_category_list = delivery_line.getVariationCategoryList() line_variation_category_list = delivery_line.getVariationCategoryList()
for movement in movement_group.getMovementList(): for movement in movement_group.getMovementList():
line_variation_category_list.extend( line_variation_category_list.extend(
......
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