Add importer, datasync for CORE-POS (API) -> Rattail
This commit is contained in:
parent
9aefbc872e
commit
ab8894ef0d
5 changed files with 250 additions and 35 deletions
|
@ -45,6 +45,23 @@ class ExportCore(commands.ImportSubcommand):
|
|||
return load_object(spec)
|
||||
|
||||
|
||||
class ImportCOREPOSAPI(commands.ImportSubcommand):
|
||||
"""
|
||||
Import data from a CORE POS API
|
||||
"""
|
||||
name = 'import-corepos-api'
|
||||
description = __doc__.strip()
|
||||
default_handler_spec = 'rattail_corepos.importing.corepos.api:FromCOREPOSToRattail'
|
||||
|
||||
def get_handler_factory(self, **kwargs):
|
||||
if self.config:
|
||||
spec = self.config.get('rattail.importing', 'corepos_api.handler',
|
||||
default=self.default_handler_spec)
|
||||
else:
|
||||
spec = self.default_handler_spec
|
||||
return load_object(spec)
|
||||
|
||||
|
||||
class ImportCOREPOSDB(commands.ImportSubcommand):
|
||||
"""
|
||||
Import data from a CORE POS database
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue