system.kanoa.inventory.addManufacturer(manufacturerInfo, userId)
Adds a new manufacturer record, used elsewhere in the inventory module to associate parts with the company that produces them. The manufacturer's code, display name, active/enabled status, and website are supplied as a dictionary, and the newly created manufacturer's id is returned on success.
Parameters
manufacturerInfo Dictionary
| - enabled | Boolean | |
| - manufacturerCode | String | |
| - manufacturerName | String | |
| - websiteUrl | String |
userId Integer:Id of the user executing the function
Returns
manufacturerId Integer
message String None if success
Example
manufacturerInfo = {
'manufacturerCode': 'ACME',
'manufacturerName': 'Acme Industrial Supply',
'websiteUrl': 'https://www.acmeindustrial.example',
'enabled': True,
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
manufacturerId, message = system.kanoa.inventory.addManufacturer(manufacturerInfo, userId)
print manufacturerId, message