Commit 527a42ce authored by Łukasz Nowak's avatar Łukasz Nowak

- fix problem with adding Invoice Line to Invoice coming from Order / Packing...

 - fix problem with adding Invoice Line to Invoice coming from Order / Packing List - Invoice is becoming diverged after such line is added, and shall be still solved - this is caused by too restrictive condition about frozenness of Simulation Movement
Note: XXX This is quick and dirty hack, it shall be solved using BPM to know if movement is frozen or not


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27071 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d950213c
......@@ -84,9 +84,11 @@ class DeliveryRule(Rule):
portal_type=delivery_movement_type_list)
# Check existing movements
for movement in applied_rule.contentValues(portal_type=movement_type):
if movement.getLastExpandSimulationState() in \
(delivery.getPortalDraftOrderStateList() + \
delivery.getPortalPlannedOrderStateList()):
if movement.getLastExpandSimulationState() not in \
self.getPortalCurrentInventoryStateList():
# XXX: This condition is quick and dirty hack - knowing if Simulation
# Movement is frozen shall not be ever hardcoded, this is BPM
# configuration
movement_delivery = movement.getDeliveryValue()
if not movement._isTreeDelivered(ignore_first=1) and \
movement_delivery not in delivery_movement_list:
......
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