diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index 844f5a553..8c1068021 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -16,7 +16,6 @@ 'depends': ['account_payment_mode'], 'data': [ 'views/res_partner_view.xml', - 'views/account_payment_method.xml', 'views/account_invoice_view.xml', 'views/account_move_line.xml', 'views/report_invoice.xml', diff --git a/account_payment_partner/models/__init__.py b/account_payment_partner/models/__init__.py index caea9e62c..152bb919c 100644 --- a/account_payment_partner/models/__init__.py +++ b/account_payment_partner/models/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- from . import res_partner -from . import account_payment_method from . import account_invoice from . import account_move_line diff --git a/account_payment_partner/models/account_invoice.py b/account_payment_partner/models/account_invoice.py index ac7d6827e..14ac17a77 100644 --- a/account_payment_partner/models/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -29,7 +29,8 @@ class AccountInvoice(models.Model): pay_mode.payment_type == 'outbound' and pay_mode.payment_method_id.bank_account_required and self.commercial_partner_id.bank_ids): - self.partner_bank_id = self.commercial_partner_id.bank_ids[0] + self.partner_bank_id =\ + self.commercial_partner_id.bank_ids[0] elif self.type == 'out_invoice': pay_mode = self.partner_id.customer_payment_mode_id self.payment_mode_id = pay_mode @@ -46,13 +47,11 @@ class AccountInvoice(models.Model): if ( self.payment_mode_id and self.payment_mode_id.payment_type == 'outbound' and - not self.payment_mode_id.payment_method_id.\ - bank_account_required): + not self.payment_mode_id.payment_method_id. + bank_account_required): self.partner_bank_id = False - print "false" elif not self.payment_mode_id: self.partner_bank_id = False - print "false" @api.model def line_get_convert(self, line, part): diff --git a/account_payment_partner/models/account_payment_method.py b/account_payment_partner/models/account_payment_method.py deleted file mode 100644 index 97289f14f..000000000 --- a/account_payment_partner/models/account_payment_method.py +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2016 Akretion (Alexis de Lattre ) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openerp import models, fields - - -class AccountPaymentMethod(models.Model): - _inherit = "account.payment.method" - - bank_account_required = fields.Boolean( - string='Bank Account Required', - help="Activate this option if this payment method requires to " - "set the bank account of your supplier on the vendor bills.") diff --git a/account_payment_partner/views/account_payment_method.xml b/account_payment_partner/views/account_payment_method.xml deleted file mode 100644 index 4f2448ffa..000000000 --- a/account_payment_partner/views/account_payment_method.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - account_payment_partner.account.payment.method.form - account.payment.method - - - - - - - - - - -