[FIX] account: reconciliation of payment with statement should not ta…
…ke lock date into account If we have a payment in october and a statement in november and the lock date is 1st november, we can't reconcile both because we try to write statement_id on payment but there is the lockdate constraint. This is not correct and we should be able to reconcile both even after lock date as it is the case for other moves.
This commit is contained in:
@@ -883,7 +883,7 @@ class AccountBankStatementLine(models.Model):
|
||||
total = self.amount
|
||||
for aml_rec in payment_aml_rec:
|
||||
total -= aml_rec.debit - aml_rec.credit
|
||||
aml_rec.write({'statement_line_id': self.id})
|
||||
aml_rec.with_context(check_move_validity=False).write({'statement_line_id': self.id})
|
||||
counterpart_moves = (counterpart_moves | aml_rec.move_id)
|
||||
|
||||
# Create move line(s). Either matching an existing journal entry (eg. invoice), in which
|
||||
|
||||
Reference in New Issue
Block a user