def expand(self, applied_rule, force=0, **kw):
   """
   Expands the rule:
   - generate a list of previsions
   - compare the prevision with existing children
     - get the list of existing movements (immutable, mutable, deletable)
     - compute the difference between prevision and existing (add,
       modify, remove)
   - add/modify/remove child movements to match prevision
   """
   return Rule._expand(self, applied_rule, force=force, **kw)
Exemple #2
0
  def expand(self, applied_rule, force=0, **kw):
    """
      Expands the Order to a new simulation tree.
      expand is only allowed to modify a simulation movement if it doesn't
      have a delivery relation yet.

      If the movement is in ordered or planned state, has no delivered
      child, and is not in order, it can be deleted.
      Else, if the movement is in ordered or planned state, has no
      delivered child, and is in order, it can be modified.
      Else, it cannot be modified.
    """
    return Rule._expand(self, applied_rule, force=force, **kw)
  def expand(self, applied_rule, delivery_movement_type_list=None, **kw):
    """
    Expands the additional Delivery movements to a new simulation tree.
    Expand is only allowed to create or modify simulation movements for
    delivery lines which are not already linked to another simulation
    movement.

    If the movement is not in current state, has no delivered child, and not
    in delivery movements, it can be deleted.
    Else if the movement is not in current state, it can be modified.
    Else, it cannot be modified.
    """
    return Rule._expand(self, applied_rule, **kw)
 def expand(self, applied_rule, **kw):
     """Expands the current movement downward.
 """
     return Rule._expand(self, applied_rule, **kw)