bank-payment/account_banking_sepa_direct_debit/models/bank_payment_line.py
Renzo Meister d202dad0ad Revert "Merge branch '2.0-fixed' into '2.0'"
This reverts merge request !8
2024-08-27 06:58:49 +00:00

21 lines
776 B
Python

# Copyright 2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from flectra import models
class BankPaymentLine(models.Model):
_inherit = "bank.payment.line"
def move_line_offsetting_account_hashcode(self):
"""
From my experience, even when you ask several direct debits
at the same date with enough delay, you will have several credits
on your bank statement: one for each mandate types.
So we split the transfer move lines by mandate type, so easier
reconciliation of the bank statement.
"""
hashcode = super().move_line_offsetting_account_hashcode()
hashcode += "-" + str(self.mandate_id.recurrent_sequence_type)
return hashcode