Use newer config strategy for all views
to make inheritance easier
This commit is contained in:
parent
db9b3617a4
commit
b64f6c7884
44 changed files with 397 additions and 75 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -45,5 +45,12 @@ class CreateCustomerOrderBatchView(CustomerOrderBatchView):
|
|||
creatable = False
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
CreateCustomerOrderBatchView = kwargs.get('CreateCustomerOrderBatchView', base['CreateCustomerOrderBatchView'])
|
||||
CreateCustomerOrderBatchView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -566,5 +566,12 @@ class CustomerOrderItemView(MasterView):
|
|||
CustomerOrderItemsView = CustomerOrderItemView
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
CustomerOrderItemView = kwargs.get('CustomerOrderItemView', base['CustomerOrderItemView'])
|
||||
CustomerOrderItemView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue