Use correct order if cron only does one reconcile at a time

This commit is contained in:
mdietrichc2c
2017-05-31 13:48:12 +02:00
parent d93089069c
commit 295a90ef03

View File

@@ -301,7 +301,7 @@ class AccountMassReconcile(models.Model):
if run_all:
reconciles.run_reconcile()
return True
reconciles.sorted(key=_get_date)
older = reconciles[0]
ordered_reconciles = reconciles.sorted(key=_get_date)
older = ordered_reconciles[:1]
older.run_reconcile()
return True