Add initial Rattail -> CORE-POS export logic

only allows "update" for Vendor model so far.  more to come after testing...
This commit is contained in:
Lance Edgar 2020-03-03 21:45:11 -06:00
parent 6f03461114
commit 0298e63384
5 changed files with 251 additions and 8 deletions

View file

@ -30,6 +30,23 @@ from rattail import commands
from rattail.util import load_object
class ExportCore(commands.ImportSubcommand):
"""
Export data from Rattail to CORE-POS
"""
name = 'export-corepos'
description = __doc__.strip()
default_handler_spec = 'rattail_corepos.corepos.importing.rattail:FromRattailToCore'
def get_handler_factory(self, **kwargs):
if self.config:
spec = self.config.get('rattail.exporting', 'corepos.handler',
default=self.default_handler_spec)
else:
spec = self.default_handler_spec
return load_object(spec)
class ImportCOREPOS(commands.ImportSubcommand):
"""
Import data from a CORE POS database