Fix config defaults for PurchaseView

so can customize that more easily
This commit is contained in:
Lance Edgar 2021-02-01 17:15:39 -06:00
parent 1cdb11c88c
commit 0209957def

View file

@ -355,14 +355,17 @@ class PurchaseView(MasterView):
@classmethod @classmethod
def defaults(cls, config): def defaults(cls, config):
cls._purchase_defaults(config)
cls._defaults(config)
@classmethod
def _purchase_defaults(cls, config):
route_prefix = cls.get_route_prefix() route_prefix = cls.get_route_prefix()
url_prefix = cls.get_url_prefix() url_prefix = cls.get_url_prefix()
permission_prefix = cls.get_permission_prefix() permission_prefix = cls.get_permission_prefix()
model_key = cls.get_model_key() model_key = cls.get_model_key()
model_title = cls.get_model_title() model_title = cls.get_model_title()
cls._defaults(config)
# receiving worksheet # receiving worksheet
config.add_tailbone_permission(permission_prefix, '{}.receiving_worksheet'.format(permission_prefix), config.add_tailbone_permission(permission_prefix, '{}.receiving_worksheet'.format(permission_prefix),
"Print receiving worksheet for {}".format(model_title)) "Print receiving worksheet for {}".format(model_title))
@ -371,6 +374,5 @@ class PurchaseView(MasterView):
permission='{}.receiving_worksheet'.format(permission_prefix)) permission='{}.receiving_worksheet'.format(permission_prefix))
def includeme(config): def includeme(config):
PurchaseView.defaults(config) PurchaseView.defaults(config)