Commit 72314d73 authored by Guillaume Michon's avatar Guillaume Michon

Added a specific _setDelivery() method to notify the older delivery that a movement is disconnected


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3369 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1606c604
......@@ -545,3 +545,15 @@ a service in a public administration)."""
return quantity - profit_quantity
return quantity
return None
# XXX FIXME Use a interaction workflow instead
# The call to activate() must be done after actual call to setDelivery() on the movement,
# but activate() must be called on the previous delivery...
def _setDelivery(self, value):
LOG('setDelivery before', 0, '')
delivery_value = self.getDeliveryValue()
Movement.setDelivery(value)
LOG('setDelivery', 0, '')
if delivery_value is not None:
LOG('delivery_value = ', 0, repr(delivery_value))
delivery_value.activate(activity='SQLQueue', after_path_and_method_id = (self.getPath(), ['immediateReindexObject', 'recursiveImmediateReindexObject']) ).edit()
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