[FIX] account: fix traceback in payment matching
when writeoff is involved, there was a traceback
This commit is contained in:
committed by
qdp-odoo
parent
fdf615a551
commit
27bbcb45ad
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user