system.kanoa.lot.addLotEvent
Description
Adds a new lot event.Syntax
addLotEvent(lotEventInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
lotId | int | ||
lotEventQty | float | ||
workOrderId | int | ||
assetId | int | ||
itemSourceId | int | ||
lotStateId | int | ||
lotStateReasonId | int | ||
shiftId | int | ||
tStamp | date | ||
comment | string | ||
lotOperationEventId | int | ||
assetTransportId | int |
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