system.kanoa.inventory.addUnitOfMeasure(unitOfMeasureInfo, userId)
Creates a new unit of measure record in the Kanoa MES inventory module, such as "EA" (each), "FT" (feet), "GAL" (gallon), or "LB" (pound).
The new record's code, name, and enabled flag are supplied via the unitOfMeasureInfo dictionary, and userId records who created the record for audit purposes.
On success, the newly generated unit of measure id is returned.
Parameters
unitOfMeasureInfo Dictionary
| - enabled | Boolean | |
| - uomCode | String | |
| - uomName | String |
userId Integer:Id of the user executing the function
Returns
unitofMeasureId Integer
message String None if success
Example
unitOfMeasureInfo = {
"uomCode"": "GAL",
"uomName"]: "Gallon",
"enabled"]: True
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
unitofMeasureId, message = system.kanoa.inventory.addUnitOfMeasure(unitOfMeasureInfo, userId)
print unitofMeasureId, message