Skip to main content

system.kanoa.lot.addLotEvent

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)
      - assetTransportId (int)
      int userId - User ID
  • Returns
      lotEventId (int)
      msg (string): None if successful
  • Code Examples

    lotEventInfo = {
    'lotId': 1,
    'lotEventQty': 100,
    'workOrderId': 56,
    'assetId':1,
    'itemSourceId': 2,
    'lotStateId': 7,
    'lotStateReasonId': 78,
    'shiftId': 4,
    'tStamp': system.date.now(),
    'comment':None,
    'lotOperationEventId': 67,
    'assetTransportId': None,
    }
    userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
    lotEventId, msg = system.kanoa.lot.addLotEvent(lotEventInfo, userId)
    print lotEventId, msg
    >>>756, None