bank-payment/account_banking_mandate/models/account_payment_method.py

23 lines
727 B
Python
Raw Normal View History

2024-05-03 08:36:50 +00:00
# Copyright 2016-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2024-10-01 05:24:28 +00:00
from flectra import api, fields, models
2024-05-03 08:36:50 +00:00
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
mandate_required = fields.Boolean(
help="Activate this option if this payment method requires your "
"customer to sign a direct debit mandate with your company.",
)
2024-10-01 05:24:28 +00:00
@api.model
def _get_payment_method_information(self):
res = super()._get_payment_method_information()
res["sepa_direct_debit"] = {
"mode": "multi",
"domain": [("type", "=", "bank")],
}
return res