Add all model/version importers
This commit is contained in:
parent
9394171ba5
commit
9ca0637be5
|
@ -31,6 +31,14 @@ from rattail import importing
|
|||
# core importer overrides
|
||||
##############################
|
||||
|
||||
class StoreImporter(importing.model.StoreImporter):
|
||||
|
||||
extension_attr = '_quickbooks'
|
||||
extension_fields = [
|
||||
'quickbooks_location',
|
||||
]
|
||||
|
||||
|
||||
class DepartmentImporter(importing.model.DepartmentImporter):
|
||||
|
||||
extension_attr = '_quickbooks'
|
||||
|
|
|
@ -30,10 +30,34 @@ from rattail.importing import versions as base
|
|||
class QuickbooksVersionMixin(object):
|
||||
|
||||
def add_quickbooks_importers(self, importers):
|
||||
importers['QuickbooksExportableInvoiceImporter'] = QuickbooksExportableInvoiceImporter
|
||||
importers['QuickbooksStore'] = QuickbooksStoreImporter
|
||||
importers['QuickbooksDepartment'] = QuickbooksDepartmentImporter
|
||||
importers['QuickbooksVendor'] = QuickbooksVendorImporter
|
||||
importers['QuickbooksExportableInvoice'] = QuickbooksExportableInvoiceImporter
|
||||
return importers
|
||||
|
||||
|
||||
class QuickbooksStoreImporter(base.VersionImporter):
|
||||
|
||||
@property
|
||||
def host_model_class(self):
|
||||
return self.model.QuickbooksStore
|
||||
|
||||
|
||||
class QuickbooksDepartmentImporter(base.VersionImporter):
|
||||
|
||||
@property
|
||||
def host_model_class(self):
|
||||
return self.model.QuickbooksDepartment
|
||||
|
||||
|
||||
class QuickbooksVendorImporter(base.VersionImporter):
|
||||
|
||||
@property
|
||||
def host_model_class(self):
|
||||
return self.model.QuickbooksVendor
|
||||
|
||||
|
||||
class QuickbooksExportableInvoiceImporter(base.VersionImporter):
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in a new issue