Add way to override CORE-POS data views

i.e. when you want to "include all except not this one" etc.
This commit is contained in:
Lance Edgar 2023-01-18 20:12:42 -06:00
parent 228b2acaa3
commit 60cc35b3dd

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar # Copyright © 2010-2023 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -27,25 +27,32 @@ CORE POS views
from .master import CoreOfficeMasterView from .master import CoreOfficeMasterView
def defaults(config, **kwargs):
mod = lambda spec: kwargs.get(spec, spec)
config.include(mod('tailbone_corepos.views.corepos.parameters'))
config.include(mod('tailbone_corepos.views.corepos.tablesyncrules'))
config.include(mod('tailbone_corepos.views.corepos.users'))
config.include(mod('tailbone_corepos.views.corepos.groups'))
config.include(mod('tailbone_corepos.views.corepos.stores'))
config.include(mod('tailbone_corepos.views.corepos.departments'))
config.include(mod('tailbone_corepos.views.corepos.subdepartments'))
config.include(mod('tailbone_corepos.views.corepos.superdepartments'))
config.include(mod('tailbone_corepos.views.corepos.vendors'))
config.include(mod('tailbone_corepos.views.corepos.origins'))
config.include(mod('tailbone_corepos.views.corepos.products'))
config.include(mod('tailbone_corepos.views.corepos.likecodes'))
config.include(mod('tailbone_corepos.views.corepos.scaleitems'))
config.include(mod('tailbone_corepos.views.corepos.members'))
config.include(mod('tailbone_corepos.views.corepos.customers'))
config.include(mod('tailbone_corepos.views.corepos.employees'))
config.include(mod('tailbone_corepos.views.corepos.coupons'))
config.include(mod('tailbone_corepos.views.corepos.taxrates'))
config.include(mod('tailbone_corepos.views.corepos.transactions'))
config.include(mod('tailbone_corepos.views.corepos.batches'))
config.include(mod('tailbone_corepos.views.corepos.purchaseorders'))
def includeme(config): def includeme(config):
config.include('tailbone_corepos.views.corepos.parameters') defaults(config)
config.include('tailbone_corepos.views.corepos.tablesyncrules')
config.include('tailbone_corepos.views.corepos.users')
config.include('tailbone_corepos.views.corepos.groups')
config.include('tailbone_corepos.views.corepos.stores')
config.include('tailbone_corepos.views.corepos.departments')
config.include('tailbone_corepos.views.corepos.subdepartments')
config.include('tailbone_corepos.views.corepos.superdepartments')
config.include('tailbone_corepos.views.corepos.vendors')
config.include('tailbone_corepos.views.corepos.origins')
config.include('tailbone_corepos.views.corepos.products')
config.include('tailbone_corepos.views.corepos.likecodes')
config.include('tailbone_corepos.views.corepos.scaleitems')
config.include('tailbone_corepos.views.corepos.members')
config.include('tailbone_corepos.views.corepos.customers')
config.include('tailbone_corepos.views.corepos.employees')
config.include('tailbone_corepos.views.corepos.coupons')
config.include('tailbone_corepos.views.corepos.taxrates')
config.include('tailbone_corepos.views.corepos.transactions')
config.include('tailbone_corepos.views.corepos.batches')
config.include('tailbone_corepos.views.corepos.purchaseorders')