mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Port almost all modules to v10 * Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug #300)
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
# © 2014 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
|
|
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from odoo import models, fields, api
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
_inherit = 'res.partner'
|
|
|
|
# v8 fields : same without the _id suffix
|
|
supplier_payment_mode_id = fields.Many2one(
|
|
'account.payment.mode', string='Supplier Payment Mode',
|
|
company_dependent=True,
|
|
domain=[('payment_type', '=', 'outbound')],
|
|
help="Select the default payment mode for this supplier.")
|
|
customer_payment_mode_id = fields.Many2one(
|
|
'account.payment.mode', string='Customer Payment Mode',
|
|
company_dependent=True,
|
|
domain=[('payment_type', '=', 'inbound')],
|
|
help="Select the default payment mode for this customer.")
|
|
|
|
@api.model
|
|
def _commercial_fields(self):
|
|
res = super(ResPartner, self)._commercial_fields()
|
|
res += ['supplier_payment_mode_id', 'customer_payment_mode_id']
|
|
return res
|