Files
bank-payment/account_banking_mandate/models/bank_payment_line.py
Pedro M. Baeza f83ce92f88 [MIG] account_banking_mandate: Finish migration to v12
* Adapted test
* Removed unneeded constraint
* Fixed view for accessibility
2018-12-13 19:39:53 +01:00

22 lines
786 B
Python

# Copyright 2014 Compassion CH - Cyril Sester <csester@compassion.ch>
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# Copyright 2015-16 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class BankPaymentLine(models.Model):
_inherit = 'bank.payment.line'
mandate_id = fields.Many2one(
comodel_name='account.banking.mandate', string='Direct Debit Mandate',
related='payment_line_ids.mandate_id')
@api.model
def same_fields_payment_line_and_bank_payment_line(self):
res = super(BankPaymentLine, self).\
same_fields_payment_line_and_bank_payment_line()
res.append('mandate_id')
return res