Fix bug for new receiving from scratch via API
This commit is contained in:
parent
d1d69e9488
commit
4d8c8b199c
|
@ -83,7 +83,7 @@ class ReceivingBatchViews(APIBatchView):
|
||||||
data['mode'] = self.enum.PURCHASE_BATCH_MODE_RECEIVING
|
data['mode'] = self.enum.PURCHASE_BATCH_MODE_RECEIVING
|
||||||
|
|
||||||
# assume "receive from PO" if given a PO key
|
# assume "receive from PO" if given a PO key
|
||||||
if data['purchase_key']:
|
if data.get('purchase_key'):
|
||||||
data['receiving_workflow'] = 'from_po'
|
data['receiving_workflow'] = 'from_po'
|
||||||
|
|
||||||
return super().create_object(data)
|
return super().create_object(data)
|
||||||
|
|
Loading…
Reference in a new issue