diff --git a/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py index 8250fa55b..761be64a1 100644 --- a/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -37,6 +37,7 @@ }, 'data': [ 'views/payment_line_view.xml', + 'views/bank_payment_line_view.xml', 'views/payment_mode_view.xml', 'views/res_company_view.xml', ], diff --git a/account_banking_pain_base/models/__init__.py b/account_banking_pain_base/models/__init__.py index 8a4154482..829202c43 100644 --- a/account_banking_pain_base/models/__init__.py +++ b/account_banking_pain_base/models/__init__.py @@ -21,6 +21,7 @@ ############################################################################## from . import payment_line +from . import bank_payment_line from . import payment_mode from . import res_company from . import banking_export_pain diff --git a/account_banking_pain_base/models/bank_payment_line.py b/account_banking_pain_base/models/bank_payment_line.py new file mode 100644 index 000000000..c00d9d9d0 --- /dev/null +++ b/account_banking_pain_base/models/bank_payment_line.py @@ -0,0 +1,40 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for Odoo +# Copyright (C) 2013-2015 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# 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 . +# +############################################################################## + +from openerp import models, fields, api + + +class BankPaymentLine(models.Model): + _inherit = 'bank.payment.line' + + priority = fields.Selection( + related='payment_line_ids.priority', string='Priority') + struct_communication_type = fields.Selection( + related='payment_line_ids.struct_communication_type', + string='Structured Communication Type') + + @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 += ['priority', 'struct_communication_type'] + return res diff --git a/account_banking_pain_base/views/bank_payment_line_view.xml b/account_banking_pain_base/views/bank_payment_line_view.xml new file mode 100644 index 000000000..65e993ad6 --- /dev/null +++ b/account_banking_pain_base/views/bank_payment_line_view.xml @@ -0,0 +1,25 @@ + + + + + + + pain.base.bank.payment.line.form + bank.payment.line + + + + + + + + + + + + + diff --git a/account_banking_pain_base/views/payment_line_view.xml b/account_banking_pain_base/views/payment_line_view.xml index f92b1bbf5..03759b568 100644 --- a/account_banking_pain_base/views/payment_line_view.xml +++ b/account_banking_pain_base/views/payment_line_view.xml @@ -7,25 +7,10 @@ - - pain.base.payment.line.form - payment.line - - - - - - - - - - - - pain.base.payment.line.inside.order.form payment.order - +