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
tailbone/views/purchases
|
@ -408,5 +408,12 @@ class PurchaseView(MasterView):
|
|||
permission='{}.receiving_worksheet'.format(permission_prefix))
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
PurchaseView = kwargs.get('PurchaseView', base['PurchaseView'])
|
||||
PurchaseView.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.
|
||||
#
|
||||
|
@ -201,5 +201,12 @@ class PurchaseCreditView(MasterView):
|
|||
permission='{}.change_status'.format(permission_prefix))
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
PurchaseCreditView = kwargs.get('PurchaseCreditView', base['PurchaseCreditView'])
|
||||
PurchaseCreditView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue