Add basic support for CORE Office -> CORE Lane export
just products data so far
This commit is contained in:
parent
236ae12d20
commit
6c9d9964dc
11 changed files with 398 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -35,18 +35,33 @@ class RattailCOREPOSExtension(ConfigExtension):
|
|||
key = 'rattail-corepos'
|
||||
|
||||
def configure(self, config):
|
||||
from corepos.db.office_op import Session as CoreSession
|
||||
from corepos.db.office_trans import Session as CoreTransSession
|
||||
|
||||
# office_op
|
||||
from corepos.db.office_op import Session
|
||||
engines = get_engines(config, section='corepos.db.office_op')
|
||||
config.core_office_op_engines = engines
|
||||
config.core_office_op_engine = engines.get('default')
|
||||
Session.configure(bind=config.core_office_op_engine)
|
||||
# TODO: deprecate / remove these next 2 lines
|
||||
config.corepos_engines = engines
|
||||
config.corepos_engine = engines.get('default')
|
||||
CoreSession.configure(bind=config.corepos_engine)
|
||||
|
||||
# office_trans
|
||||
from corepos.db.office_trans import Session
|
||||
engines = get_engines(config, section='corepos.db.office_trans')
|
||||
config.core_office_trans_engines = engines
|
||||
config.core_office_trans_engine = engines.get('default')
|
||||
Session.configure(bind=config.core_office_trans_engine)
|
||||
# TODO: deprecate / remove these next 2 lines
|
||||
config.coretrans_engines = engines
|
||||
config.coretrans_engine = engines.get('default')
|
||||
CoreTransSession.configure(bind=config.coretrans_engine)
|
||||
|
||||
# lane_op
|
||||
from corepos.db.lane_op import Session
|
||||
engines = get_engines(config, section='corepos.db.lane_op')
|
||||
config.core_lane_op_engines = engines
|
||||
config.core_lane_op_engine = engines.get('default')
|
||||
Session.configure(bind=config.core_lane_op_engine)
|
||||
|
||||
|
||||
def core_office_url(config, require=False, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue