Skip to main content

system.kanoa.lot.addLotEvent

This function is part of the kanoaOPS module

Description

Adds a new lot event.

Syntax

addLotEvent(lotEventInfo, userId)
  • Parameters
      lotEventInfo (dict)
      - lotId (int)
      - lotEventQty (float)
      - workOrderId (int)
      - assetId (int)
      - itemSourceId (int)
      - lotStateId (int)
      - lotStateReasonId (int)
      - shiftId (int)
      - tStamp (date)
      - comment (string)
      - lotOperationEventId (int)
      int userId - User ID
  • Returns
      lotEventId (int)
      msg (string): None if successful
  • Code Examples

    # Example usage
    >lotEventInfo = {'lotId': 1, 'lotEventQty': 100, 'workOrderId': 56, 'assetId':1, 'itemSourceId': 2, 'lotStateId': 7, 'lotStateReasonId': 78, 'shiftId': 4, 'tStamp': somedate, 'comment':None, 'lotOperationEventId': 67}
    >userId = 5
    >lotEventId, msg = system.kanoa.lot.addLotEvent(lotEventInfo, userId)
    >print(lotEventId)