Add receiving workflow as param when making receiving batch

This commit is contained in:
Lance Edgar 2022-12-05 15:22:59 -06:00
parent 2e3823364c
commit 9c54a4ada1

View file

@ -116,6 +116,7 @@ class ReceivingBatchView(PurchasingBatchView):
'batch_type', # TODO: ideally would get rid of this one 'batch_type', # TODO: ideally would get rid of this one
'store', 'store',
'vendor', 'vendor',
'description',
'receiving_workflow', 'receiving_workflow',
'truck_dump', 'truck_dump',
'truck_dump_children_first', 'truck_dump_children_first',
@ -126,6 +127,7 @@ class ReceivingBatchView(PurchasingBatchView):
'invoice_parser_key', 'invoice_parser_key',
'department', 'department',
'purchase', 'purchase',
'params',
'vendor_email', 'vendor_email',
'vendor_fax', 'vendor_fax',
'vendor_contact', 'vendor_contact',
@ -138,7 +140,6 @@ class ReceivingBatchView(PurchasingBatchView):
'invoice_number', 'invoice_number',
'invoice_total', 'invoice_total',
'invoice_total_calculated', 'invoice_total_calculated',
'description',
'notes', 'notes',
'created', 'created',
'created_by', 'created_by',
@ -647,6 +648,8 @@ class ReceivingBatchView(PurchasingBatchView):
if 'vendor_uuid' in self.request.matchdict: if 'vendor_uuid' in self.request.matchdict:
kwargs['vendor_uuid'] = self.request.matchdict['vendor_uuid'] kwargs['vendor_uuid'] = self.request.matchdict['vendor_uuid']
# TODO: ugh should just have workflow and no batch_type
kwargs['receiving_workflow'] = batch_type
if batch_type == 'from_scratch': if batch_type == 'from_scratch':
kwargs.pop('truck_dump_batch', None) kwargs.pop('truck_dump_batch', None)
kwargs.pop('truck_dump_batch_uuid', None) kwargs.pop('truck_dump_batch_uuid', None)