[FIX] account: fix traceback in payment matching

when writeoff is involved, there was a traceback
This commit is contained in:
Priyanka Kakadiya
2018-06-22 14:22:33 +02:00
committed by qdp-odoo
parent fdf615a551
commit 27bbcb45ad
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -912,7 +912,7 @@ class AccountMoveLine(models.Model):
""" Create a writeoff move per journal for the account.move.lines in self. If debit/credit is not specified in vals,
the writeoff amount will be computed as the sum of amount_residual of the given recordset.
:param writeoff_vals: dict containing values suitable for account_move_line.create(). The data in vals will
:param writeoff_vals: list of dicts containing values suitable for account_move_line.create(). The data in vals will
be processed to create bot writeoff acount.move.line and their enclosing account.move.
"""
def compute_writeoff_counterpart_vals(values):
@@ -743,7 +743,7 @@ class AccountReconciliation(models.AbstractModel):
if writeoff_currency != company_currency:
mv_line_dict['debit'] = writeoff_currency._convert(mv_line_dict['debit'], company_currency, company, date)
mv_line_dict['credit'] = writeoff_currency._convert(mv_line_dict['credit'], company_currency, company, date)
writeoff_lines += account_move_line._create_writeoff(mv_line_dict)
writeoff_lines += account_move_line._create_writeoff([mv_line_dict])
(account_move_line + writeoff_lines).reconcile()
else: