Populate Vendor.id when importing from CORE API
				
					
				
			This commit is contained in:
		
							parent
							
								
									95952c665e
								
							
						
					
					
						commit
						ef68d4b2d0
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -429,6 +429,7 @@ class VendorImporter(FromCOREPOSAPI, corepos_importing.model.VendorImporter): | |||
|     key = 'corepos_id' | ||||
|     supported_fields = [ | ||||
|         'corepos_id', | ||||
|         'id', | ||||
|         'name', | ||||
|         'abbreviation', | ||||
|         'special_discount', | ||||
|  | @ -443,6 +444,7 @@ class VendorImporter(FromCOREPOSAPI, corepos_importing.model.VendorImporter): | |||
|     def normalize_host_object(self, vendor): | ||||
|         return { | ||||
|             'corepos_id': int(vendor['vendorID']), | ||||
|             'id': str(vendor['vendorID']), | ||||
|             'name': vendor['vendorName'], | ||||
|             'abbreviation': vendor.get('vendorAbbreviation') or None, | ||||
|             'special_discount': decimal.Decimal(vendor['discountRate']), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar