Skip to main content

system.kanoa.lot.addLotOperation

This function is part of the kanoaOPS module

Description

Adds a new lot operation.

Syntax

addLotOperation(lotOperationInfo, userId)
  • Parameters
      lotOperationInfo (dict)
      - lotOperationName (string)
      - lotOperationColor (string)
      - allowInputLots (bool): True if this operation can consume input lots
      - allowOutputLots (bool) True if this operation can product output lots
      - enabled (bool)
      int userId - User ID
  • Returns
      lotOperationId (int)
      msg (string): None if successful
  • Code Examples

    # Example usage
    >lotOperationInfo = {'lotOperationName': 'Scrap', 'lotOperationColor': '#0000FF', allowInputLots': True, 'allowOutputLots': False, enabled': True}
    >userId = 5
    >lotOperationId, msg = system.kanoa.lot.addLotOperation(lotOperationInfo, userId)
    >print(lotOperationId)