Commit fe19a57e authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[enh] retry to guess FIXME movments during import

parent d569189e
......@@ -53,7 +53,15 @@ def handle_recordbank_csv(csv_file):
# I've already imported this movement, don't do anything
if Movement.objects.filter(bank_id=fr_or_nl(entry, "Ref. v/d verrichting")).exists():
for_report["skip_because_already_imported"].append(Movement.objects.get(bank_id=fr_or_nl(entry, "Ref. v/d verrichting")))
movement = Movement.objects.get(bank_id=fr_or_nl(entry, "Ref. v/d verrichting"))
if movement.title == "FIXME":
title = guess_title(movement, entry)
if title:
movement.title = title
for_report["guessed_title"].append((movement, fr_or_nl(entry, "Mededeling 1 :"), fr_or_nl(entry, "Naam v/d tegenpartij :")))
movement_that_might_be_the_same = Movement.objects.filter(, amount=movement.amount, kind=movement.kind, bank_id__isnull=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment