[FIX] account: no candidate in reconciliation model

Make sure we don't execute the method with an empty list of candidates
to avoid a zero division.

opw-2049881

closes odoo/odoo#35723

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-08-14 12:10:31 +00:00
parent 9e6f342e06
commit 6b6d290a5b
@@ -544,6 +544,8 @@ class AccountReconcileModel(models.Model):
'''
if not self.match_total_amount:
return True
if not candidates:
return False
# Match total residual amount.
total_residual = 0.0