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
|
@ -377,5 +377,12 @@ class NewCostingBatch(colander.Schema):
|
|||
validator=valid_workflow)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
CostingBatchView = kwargs.get('CostingBatchView', base['CostingBatchView'])
|
||||
CostingBatchView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
|
@ -527,5 +527,12 @@ class OrderingBatchView(PurchasingBatchView):
|
|||
"Download {} as Excel".format(model_title))
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
OrderingBatchView = kwargs.get('OrderingBatchView', base['OrderingBatchView'])
|
||||
OrderingBatchView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
|
@ -2082,5 +2082,12 @@ class DeclareCreditForm(colander.MappingSchema):
|
|||
missing=colander.null)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
ReceivingBatchView = kwargs.get('ReceivingBatchView', base['ReceivingBatchView'])
|
||||
ReceivingBatchView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue