Add validtion to prevent duplicate files for multi-invoice receiving

by comparing sha256 hash values for each file
This commit is contained in:
Lance Edgar 2023-10-19 14:03:25 -05:00
parent aaf6f05820
commit 0d30247353
3 changed files with 36 additions and 1 deletions

View file

@ -570,7 +570,7 @@ class ReceivingBatchView(PurchasingBatchView):
elif workflow == 'from_multi_invoice':
if 'invoice_files' not in f:
f.insert_before('invoice_file', 'invoice_files')
f.set_type('invoice_files', 'multi_file')
f.set_type('invoice_files', 'multi_file', validate_unique=True)
f.set_required('invoice_parser_key')
f.remove('truck_dump_batch_uuid',
'po_number',