(self, delivery_line, movement, activate_kw,
                          base_id, cell_key)
return cell
Refer to the docstring in GeneratedDeliveryBuilder.
      Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
      existing relationship.
Refer to the docstring in GeneratedDeliveryBuilder.
      Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
      existing relationship.
Refer to the docstring in GeneratedDeliveryBuilder . Unlike GeneratedDeliveryBuilder SimulatedDeliveryBuilder needs to respect existing relationship .
def _createDeliveryCell(self, delivery_line, movement, activate_kw,
                          base_id, cell_key):
    """
      Refer to the docstring in GeneratedDeliveryBuilder.
      Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
      existing relationship.
    """
    try:
      old_cell = movement.getDeliveryValue()
    except AttributeError:
      old_cell = None
    if old_cell is None:
      # from scratch
      cell = delivery_line.newCell(base_id=base_id, \
               portal_type=self.getDeliveryCellPortalType(),
               activate_kw=activate_kw,*cell_key)
    else:
      # from duplicated original line
      cp = tryMethodCallWithTemporaryPermission(
        delivery_line, 'Copy or Move',
        lambda parent, *ids:
        parent._duplicate(parent.manage_copyObjects(ids=ids))[0],
        (delivery_line, old_cell.getId()), {}, CopyError)
      cell = delivery_line[cp['new_id']]

    return cell
def _createDeliveryCell ( self , delivery_line , movement , activate_kw , base_id , cell_key ) : try : old_cell = movement . getDeliveryValue ( ) except AttributeError : old_cell = None if old_cell is None : # from scratch cell = delivery_line . newCell ( base_id = base_id , portal_type = self . getDeliveryCellPortalType ( ) , activate_kw = activate_kw , * cell_key ) else : # from duplicated original line cp = tryMethodCallWithTemporaryPermission ( delivery_line , 'Copy or Move' , lambda parent , * ids : parent . _duplicate ( parent . manage_copyObjects ( ids = ids ) ) [ 0 ] , ( delivery_line , old_cell . getId ( ) ) , { } , CopyError ) cell = delivery_line [ cp [ 'new_id' ] ] return cell