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
'store',
'vendor',
'description',
'receiving_workflow',
'truck_dump',
'truck_dump_children_first',
@ -126,6 +127,7 @@ class ReceivingBatchView(PurchasingBatchView):
'invoice_parser_key',
'department',
'purchase',
'params',
'vendor_email',
'vendor_fax',
'vendor_contact',
@ -138,7 +140,6 @@ class ReceivingBatchView(PurchasingBatchView):
'invoice_number',
'invoice_total',
'invoice_total_calculated',
'description',
'notes',
'created',
'created_by',
@ -647,6 +648,8 @@ class ReceivingBatchView(PurchasingBatchView):
if 'vendor_uuid' in self.request.matchdict:
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':
kwargs.pop('truck_dump_batch', None)
kwargs.pop('truck_dump_batch_uuid', None)