Use newer config strategy for all views
to make inheritance easier
This commit is contained in:
parent
db9b3617a4
commit
b64f6c7884
|
@ -239,5 +239,12 @@ class AuthenticationView(View):
|
||||||
config.add_view(cls, attr='stop_root', route_name='stop_root')
|
config.add_view(cls, attr='stop_root', route_name='stop_root')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
AuthenticationView = kwargs.get('AuthenticationView', base['AuthenticationView'])
|
||||||
AuthenticationView.defaults(config)
|
AuthenticationView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -210,5 +210,12 @@ class EmailBounceView(MasterView):
|
||||||
cls._defaults(config)
|
cls._defaults(config)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
EmailBounceView = kwargs.get('EmailBounceView', base['EmailBounceView'])
|
||||||
EmailBounceView.defaults(config)
|
EmailBounceView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -110,5 +110,12 @@ class CategoryView(MasterView):
|
||||||
CategoriesView = CategoryView
|
CategoriesView = CategoryView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CategoryView = kwargs.get('CategoryView', base['CategoryView'])
|
||||||
CategoryView.defaults(config)
|
CategoryView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -340,5 +340,12 @@ class CommonView(View):
|
||||||
permission='admin')
|
permission='admin')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CommonView = kwargs.get('CommonView', base['CommonView'])
|
||||||
CommonView.defaults(config)
|
CommonView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -80,5 +80,12 @@ class CustomerGroupView(MasterView):
|
||||||
CustomerGroupsView = CustomerGroupView
|
CustomerGroupsView = CustomerGroupView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CustomerGroupView = kwargs.get('CustomerGroupView', base['CustomerGroupView'])
|
||||||
CustomerGroupView.defaults(config)
|
CustomerGroupView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -45,5 +45,12 @@ class CreateCustomerOrderBatchView(CustomerOrderBatchView):
|
||||||
creatable = False
|
creatable = False
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CreateCustomerOrderBatchView = kwargs.get('CreateCustomerOrderBatchView', base['CreateCustomerOrderBatchView'])
|
||||||
CreateCustomerOrderBatchView.defaults(config)
|
CreateCustomerOrderBatchView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -566,5 +566,12 @@ class CustomerOrderItemView(MasterView):
|
||||||
CustomerOrderItemsView = CustomerOrderItemView
|
CustomerOrderItemsView = CustomerOrderItemView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CustomerOrderItemView = kwargs.get('CustomerOrderItemView', base['CustomerOrderItemView'])
|
||||||
CustomerOrderItemView.defaults(config)
|
CustomerOrderItemView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -241,5 +241,12 @@ class DepartmentView(MasterView):
|
||||||
cls._defaults(config)
|
cls._defaults(config)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
DepartmentView = kwargs.get('DepartmentView', base['DepartmentView'])
|
||||||
DepartmentView.defaults(config)
|
DepartmentView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -64,5 +64,12 @@ class DepositLinkView(MasterView):
|
||||||
DepositLinksView = DepositLinkView
|
DepositLinksView = DepositLinkView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
DepositLinkView = kwargs.get('DepositLinkView', base['DepositLinkView'])
|
||||||
DepositLinkView.defaults(config)
|
DepositLinkView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -108,5 +108,12 @@ class FamilyView(MasterView):
|
||||||
FamiliesView = FamilyView
|
FamiliesView = FamilyView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
FamilyView = kwargs.get('FamilyView', base['FamilyView'])
|
||||||
FamilyView.defaults(config)
|
FamilyView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -112,5 +112,12 @@ class GenerateFeatureView(View):
|
||||||
renderer='/generate_feature.mako')
|
renderer='/generate_feature.mako')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
GenerateFeatureView = kwargs.get('GenerateFeatureView', base['GenerateFeatureView'])
|
||||||
GenerateFeatureView.defaults(config)
|
GenerateFeatureView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -63,5 +63,12 @@ class FilemonView(View):
|
||||||
config.add_view(cls, attr='restart', route_name='filemon.restart', permission='filemon.restart')
|
config.add_view(cls, attr='restart', route_name='filemon.restart', permission='filemon.restart')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
FilemonView = kwargs.get('FilemonView', base['FilemonView'])
|
||||||
FilemonView.defaults(config)
|
FilemonView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -90,5 +90,12 @@ class IFPS_PLUView(MasterView):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
IFPS_PLUView = kwargs.get('IFPS_PLUView', base['IFPS_PLUView'])
|
||||||
IFPS_PLUView.defaults(config)
|
IFPS_PLUView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -650,5 +650,12 @@ class RunJobSchema(colander.MappingSchema):
|
||||||
warnings = colander.SchemaNode(colander.Bool())
|
warnings = colander.SchemaNode(colander.Bool())
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
ImportingView = kwargs.get('ImportingView', base['ImportingView'])
|
||||||
ImportingView.defaults(config)
|
ImportingView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -70,5 +70,12 @@ class InventoryAdjustmentReasonView(MasterView):
|
||||||
InventoryAdjustmentReasonsView = InventoryAdjustmentReasonView
|
InventoryAdjustmentReasonsView = InventoryAdjustmentReasonView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
InventoryAdjustmentReasonView = kwargs.get('InventoryAdjustmentReasonView', base['InventoryAdjustmentReasonView'])
|
||||||
InventoryAdjustmentReasonView.defaults(config)
|
InventoryAdjustmentReasonView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -177,5 +177,12 @@ class LabelProfileView(MasterView):
|
||||||
ProfilesView = LabelProfileView
|
ProfilesView = LabelProfileView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
LabelProfileView = kwargs.get('LabelProfileView', base['LabelProfileView'])
|
||||||
LabelProfileView.defaults(config)
|
LabelProfileView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -189,5 +189,12 @@ class MemberView(MasterView):
|
||||||
return member.phones[0].number
|
return member.phones[0].number
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
MemberView = kwargs.get('MemberView', base['MemberView'])
|
||||||
MemberView.defaults(config)
|
MemberView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -575,23 +575,36 @@ class RecipientsWidgetBuefy(dfwidget.Widget):
|
||||||
return field.renderer(template, **values)
|
return field.renderer(template, **values)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
config.add_tailbone_permission('messages', 'messages.list', "List/Search Messages")
|
config.add_tailbone_permission('messages', 'messages.list',
|
||||||
|
"List/Search Messages")
|
||||||
|
|
||||||
# inbox
|
# inbox
|
||||||
|
InboxView = kwargs.get('InboxView', base['InboxView'])
|
||||||
config.add_route('messages.inbox', '/messages/inbox/')
|
config.add_route('messages.inbox', '/messages/inbox/')
|
||||||
config.add_view(InboxView, attr='index', route_name='messages.inbox',
|
config.add_view(InboxView, attr='index',
|
||||||
|
route_name='messages.inbox',
|
||||||
permission='messages.list')
|
permission='messages.list')
|
||||||
|
|
||||||
# archive
|
# archive
|
||||||
|
ArchiveView = kwargs.get('ArchiveView', base['ArchiveView'])
|
||||||
config.add_route('messages.archive', '/messages/archive/')
|
config.add_route('messages.archive', '/messages/archive/')
|
||||||
config.add_view(ArchiveView, attr='index', route_name='messages.archive',
|
config.add_view(ArchiveView, attr='index',
|
||||||
|
route_name='messages.archive',
|
||||||
permission='messages.list')
|
permission='messages.list')
|
||||||
|
|
||||||
# sent
|
# sent
|
||||||
|
SentView = kwargs.get('SentView', base['SentView'])
|
||||||
config.add_route('messages.sent', '/messages/sent/')
|
config.add_route('messages.sent', '/messages/sent/')
|
||||||
config.add_view(SentView, attr='index', route_name='messages.sent',
|
config.add_view(SentView, attr='index',
|
||||||
|
route_name='messages.sent',
|
||||||
permission='messages.list')
|
permission='messages.list')
|
||||||
|
|
||||||
|
MessageView = kwargs.get('MessageView', base['MessageView'])
|
||||||
MessageView.defaults(config)
|
MessageView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -54,5 +54,12 @@ class PermissionView(MasterView):
|
||||||
return query
|
return query
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
PermissionView = kwargs.get('PermissionView', base['PermissionView'])
|
||||||
PermissionView.defaults(config)
|
PermissionView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -65,9 +65,17 @@ def cancel(request):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
progress = kwargs.get('progress', base['progress'])
|
||||||
config.add_route('progress', '/progress/{key}')
|
config.add_route('progress', '/progress/{key}')
|
||||||
config.add_view(progress, route_name='progress', renderer='json')
|
config.add_view(progress, route_name='progress', renderer='json')
|
||||||
|
|
||||||
|
cancel = kwargs.get('cancel', base['cancel'])
|
||||||
config.add_route('progress.cancel', '/progress/{key}/cancel')
|
config.add_route('progress.cancel', '/progress/{key}/cancel')
|
||||||
config.add_view(cancel, route_name='progress.cancel', renderer='json')
|
config.add_view(cancel, route_name='progress.cancel', renderer='json')
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -223,5 +223,12 @@ class GenerateProjectView(View):
|
||||||
renderer='/generate_project.mako')
|
renderer='/generate_project.mako')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
GenerateProjectView = kwargs.get('GenerateProjectView', base['GenerateProjectView'])
|
||||||
GenerateProjectView.defaults(config)
|
GenerateProjectView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -408,5 +408,12 @@ class PurchaseView(MasterView):
|
||||||
permission='{}.receiving_worksheet'.format(permission_prefix))
|
permission='{}.receiving_worksheet'.format(permission_prefix))
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
PurchaseView = kwargs.get('PurchaseView', base['PurchaseView'])
|
||||||
PurchaseView.defaults(config)
|
PurchaseView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -201,5 +201,12 @@ class PurchaseCreditView(MasterView):
|
||||||
permission='{}.change_status'.format(permission_prefix))
|
permission='{}.change_status'.format(permission_prefix))
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
PurchaseCreditView = kwargs.get('PurchaseCreditView', base['PurchaseCreditView'])
|
||||||
PurchaseCreditView.defaults(config)
|
PurchaseCreditView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -377,5 +377,12 @@ class NewCostingBatch(colander.Schema):
|
||||||
validator=valid_workflow)
|
validator=valid_workflow)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
CostingBatchView = kwargs.get('CostingBatchView', base['CostingBatchView'])
|
||||||
CostingBatchView.defaults(config)
|
CostingBatchView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -527,5 +527,12 @@ class OrderingBatchView(PurchasingBatchView):
|
||||||
"Download {} as Excel".format(model_title))
|
"Download {} as Excel".format(model_title))
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
OrderingBatchView = kwargs.get('OrderingBatchView', base['OrderingBatchView'])
|
||||||
OrderingBatchView.defaults(config)
|
OrderingBatchView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2082,5 +2082,12 @@ class DeclareCreditForm(colander.MappingSchema):
|
||||||
missing=colander.null)
|
missing=colander.null)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
ReceivingBatchView = kwargs.get('ReceivingBatchView', base['ReceivingBatchView'])
|
||||||
ReceivingBatchView.defaults(config)
|
ReceivingBatchView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -107,5 +107,12 @@ class ReportCodeView(MasterView):
|
||||||
ReportCodesView = ReportCodeView
|
ReportCodesView = ReportCodeView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
ReportCodeView = kwargs.get('ReportCodeView', base['ReportCodeView'])
|
||||||
ReportCodeView.defaults(config)
|
ReportCodeView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -800,14 +800,24 @@ def add_routes(config):
|
||||||
config.add_route('reports.inventory', '/reports/inventory')
|
config.add_route('reports.inventory', '/reports/inventory')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
# TODO: not in love with this pattern, but works for now
|
# TODO: not in love with this pattern, but works for now
|
||||||
add_routes(config)
|
add_routes(config)
|
||||||
|
OrderingWorksheet = kwargs.get('OrderingWorksheet', base['OrderingWorksheet'])
|
||||||
config.add_view(OrderingWorksheet, route_name='reports.ordering',
|
config.add_view(OrderingWorksheet, route_name='reports.ordering',
|
||||||
renderer='/reports/ordering.mako')
|
renderer='/reports/ordering.mako')
|
||||||
|
InventoryWorksheet = kwargs.get('InventoryWorksheet', base['InventoryWorksheet'])
|
||||||
config.add_view(InventoryWorksheet, route_name='reports.inventory',
|
config.add_view(InventoryWorksheet, route_name='reports.inventory',
|
||||||
renderer='/reports/inventory.mako')
|
renderer='/reports/inventory.mako')
|
||||||
|
|
||||||
|
ReportOutputView = kwargs.get('ReportOutputView', base['ReportOutputView'])
|
||||||
ReportOutputView.defaults(config)
|
ReportOutputView.defaults(config)
|
||||||
|
|
||||||
|
ProblemReportView = kwargs.get('ProblemReportView', base['ProblemReportView'])
|
||||||
ProblemReportView.defaults(config)
|
ProblemReportView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -529,5 +529,12 @@ class PermissionsWidget(dfwidget.Widget):
|
||||||
return field.renderer(template, **values)
|
return field.renderer(template, **values)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
RoleView = kwargs.get('RoleView', base['RoleView'])
|
||||||
RoleView.defaults(config)
|
RoleView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -310,6 +310,15 @@ class AppSettingsView(View):
|
||||||
permission='settings.edit')
|
permission='settings.edit')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
AppSettingsView = kwargs.get('AppSettingsView', base['AppSettingsView'])
|
||||||
AppSettingsView.defaults(config)
|
AppSettingsView.defaults(config)
|
||||||
|
|
||||||
|
SettingView = kwargs.get('SettingView', base['SettingView'])
|
||||||
SettingView.defaults(config)
|
SettingView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -207,6 +207,15 @@ class WorkedShiftView(MasterView):
|
||||||
WorkedShiftsView = WorkedShiftView
|
WorkedShiftsView = WorkedShiftView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
ScheduledShiftView = kwargs.get('ScheduledShiftView', base['ScheduledShiftView'])
|
||||||
ScheduledShiftView.defaults(config)
|
ScheduledShiftView.defaults(config)
|
||||||
|
|
||||||
|
WorkedShiftView = kwargs.get('WorkedShiftView', base['WorkedShiftView'])
|
||||||
WorkedShiftView.defaults(config)
|
WorkedShiftView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -212,5 +212,12 @@ class ScheduleView(TimeSheetView):
|
||||||
permission='schedule.print')
|
permission='schedule.print')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
ScheduleView = kwargs.get('ScheduleView', base['ScheduleView'])
|
||||||
ScheduleView.defaults(config)
|
ScheduleView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -133,5 +133,12 @@ class TimeSheetView(BaseTimeSheetView):
|
||||||
permission='timesheet.edit')
|
permission='timesheet.edit')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TimeSheetView = kwargs.get('TimeSheetView', base['TimeSheetView'])
|
||||||
TimeSheetView.defaults(config)
|
TimeSheetView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -121,5 +121,12 @@ class StoreView(MasterView):
|
||||||
StoresView = StoreView
|
StoresView = StoreView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
StoreView = kwargs.get('StoreView', base['StoreView'])
|
||||||
StoreView.defaults(config)
|
StoreView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -154,5 +154,12 @@ class SubdepartmentView(MasterView):
|
||||||
SubdepartmentsView = SubdepartmentView
|
SubdepartmentsView = SubdepartmentView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
SubdepartmentView = kwargs.get('SubdepartmentView', base['SubdepartmentView'])
|
||||||
SubdepartmentView.defaults(config)
|
SubdepartmentView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -76,5 +76,12 @@ class TableView(MasterView):
|
||||||
TablesView = TableView
|
TablesView = TableView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TableView = kwargs.get('TableView', base['TableView'])
|
||||||
TableView.defaults(config)
|
TableView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -64,5 +64,12 @@ class TaxView(MasterView):
|
||||||
TaxesView = TaxView
|
TaxesView = TaxView
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TaxView = kwargs.get('TaxView', base['TaxView'])
|
||||||
TaxView.defaults(config)
|
TaxView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -187,5 +187,12 @@ class TempmonApplianceView(MasterView):
|
||||||
raise NotImplementedError("too many uploads?")
|
raise NotImplementedError("too many uploads?")
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TempmonApplianceView = kwargs.get('TempmonApplianceView', base['TempmonApplianceView'])
|
||||||
TempmonApplianceView.defaults(config)
|
TempmonApplianceView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2019 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -276,5 +276,12 @@ class TempmonClientView(MasterView):
|
||||||
permission='{}.restart'.format(permission_prefix))
|
permission='{}.restart'.format(permission_prefix))
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TempmonClientView = kwargs.get('TempmonClientView', base['TempmonClientView'])
|
||||||
TempmonClientView.defaults(config)
|
TempmonClientView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2020 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -158,5 +158,12 @@ class TempmonDashboardView(View):
|
||||||
renderer='json')
|
renderer='json')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TempmonDashboardView = kwargs.get('TempmonDashboardView', base['TempmonDashboardView'])
|
||||||
TempmonDashboardView.defaults(config)
|
TempmonDashboardView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2019 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -344,5 +344,12 @@ class TempmonProbeView(MasterView):
|
||||||
cls._defaults(config)
|
cls._defaults(config)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TempmonProbeView = kwargs.get('TempmonProbeView', base['TempmonProbeView'])
|
||||||
TempmonProbeView.defaults(config)
|
TempmonProbeView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2018 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -125,5 +125,12 @@ class TempmonReadingView(MasterView):
|
||||||
return tags.link_to(text, url)
|
return tags.link_to(text, url)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TempmonReadingView = kwargs.get('TempmonReadingView', base['TempmonReadingView'])
|
||||||
TempmonReadingView.defaults(config)
|
TempmonReadingView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -39,5 +39,12 @@ class TransactionView(base.TransactionView):
|
||||||
model_row_class = trainwreck.TransactionItem
|
model_row_class = trainwreck.TransactionItem
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
TransactionView = kwargs.get('TransactionView', base['TransactionView'])
|
||||||
TransactionView.defaults(config)
|
TransactionView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -126,5 +126,12 @@ class UnitOfMeasureView(MasterView):
|
||||||
permission='{}.collect_wild_uoms'.format(permission_prefix))
|
permission='{}.collect_wild_uoms'.format(permission_prefix))
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
|
||||||
|
UnitOfMeasureView = kwargs.get('UnitOfMeasureView', base['UnitOfMeasureView'])
|
||||||
UnitOfMeasureView.defaults(config)
|
UnitOfMeasureView.defaults(config)
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
defaults(config)
|
||||||
|
|
Loading…
Reference in a new issue