Changeset - f61a0a7dd943
[Not reviewed]
0 2 0
Lance Edgar - 4 years ago 2021-01-30 13:17:45
lance@edbob.org
Add importer support for `VendorItem`

this was done mostly for CORE <-> CORE diffs
2 files changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general) First comment
rattail_corepos/corepos/importing/db/corepos.py
Show inline comments
 
@@ -65,6 +65,7 @@ class FromCoreToCoreBase(object):
 
        importers['VendorContact'] = VendorContactImporter
 
        importers['Product'] = ProductImporter
 
        importers['ProductFlag'] = ProductFlagImporter
 
        importers['VendorItem'] = VendorItemImporter
 
        importers['Employee'] = EmployeeImporter
 
        importers['CustData'] = CustDataImporter
 
        importers['MemberType'] = MemberTypeImporter
 
@@ -137,6 +138,9 @@ class ProductImporter(FromCore, corepos_importing.model.ProductImporter):
 
class ProductFlagImporter(FromCore, corepos_importing.model.ProductFlagImporter):
 
    pass
 

	
 
class VendorItemImporter(FromCore, corepos_importing.model.VendorItemImporter):
 
    pass
 

	
 
class EmployeeImporter(FromCore, corepos_importing.model.EmployeeImporter):
 
    pass
 

	
rattail_corepos/corepos/importing/db/model.py
Show inline comments
 
@@ -118,6 +118,11 @@ class ProductFlagImporter(ToCore):
 
    key = 'bit_number'
 

	
 

	
 
class VendorItemImporter(ToCore):
 
    model_class = corepos.VendorItem
 
    key = ('sku', 'vendor_id')
 

	
 

	
 
class EmployeeImporter(ToCore):
 
    model_class = corepos.Employee
 
    key = 'number'
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now