mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] account_banking_pain_base: Several things:
* Make it easier to extend structured communication types. * Use new style to make selection extendable. * Help text for bank and BIC fields. Courtesy of Alexis de Lattre. * Do not use InstrPrty for Direct Debit.
This commit is contained in:
committed by
Pedro M. Baeza
parent
7c655e0092
commit
c12515d697
@@ -24,3 +24,4 @@ from . import payment_line
|
||||
from . import payment_mode
|
||||
from . import res_company
|
||||
from . import banking_export_pain
|
||||
from . import res_partner_bank
|
||||
|
||||
@@ -229,7 +229,7 @@ class BankingExportPain(orm.AbstractModel):
|
||||
control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum')
|
||||
payment_type_info_2_6 = etree.SubElement(
|
||||
payment_info_2_0, 'PmtTpInf')
|
||||
if priority:
|
||||
if priority and gen_args['payment_method'] != 'DD':
|
||||
instruction_priority_2_7 = etree.SubElement(
|
||||
payment_type_info_2_6, 'InstrPrty')
|
||||
instruction_priority_2_7.text = priority
|
||||
|
||||
@@ -42,7 +42,8 @@ class PaymentLine(orm.Model):
|
||||
"company. Depicts 'What do you want to say to the recipient "
|
||||
"about this order ?'"),
|
||||
'struct_communication_type': fields.selection(
|
||||
_get_struct_communication_types, 'Structured Communication Type'),
|
||||
'_get_struct_communication_types',
|
||||
'Structured Communication Type'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
35
account_banking_pain_base/models/res_partner_bank.py
Normal file
35
account_banking_pain_base/models/res_partner_bank.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) ACSONE SA/NV (<http://acsone.eu>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
|
||||
|
||||
class ResPartnerBank(models.Model):
|
||||
_inherit = 'res.partner.bank'
|
||||
|
||||
bank = fields.Many2one(help="If this field is set and the related bank "
|
||||
"has a 'Bank Identifier Code', then this BIC "
|
||||
"will be used to generate the credit "
|
||||
"transfers and direct debits files.")
|
||||
bank_bic = fields.Char(help="In the generation of credit transfer and "
|
||||
"direct debit files, this BIC will be used "
|
||||
"only when the 'Bank' field is empty, or "
|
||||
"has a value but the field 'Bank Identifier "
|
||||
"Code' is not set on the related bank.")
|
||||
Reference in New Issue
Block a user