diff --git a/l10n_ch_base_bank/models/bank.py b/l10n_ch_base_bank/models/bank.py index 6ea083568..b10672496 100644 --- a/l10n_ch_base_bank/models/bank.py +++ b/l10n_ch_base_bank/models/bank.py @@ -378,9 +378,11 @@ def onchange_acc_number_set_swiss_bank(self): @api.onchange('ccp') def onchange_ccp_set_acc_number(self): - # If ccp changes and it's a postal bank update acc_number to ccp - # we don't want make acc_number as computed to have possibility set it - # manually and also avoid to shadow other logic on acc_number if exist + """ + If ccp changes and it's a postal bank update acc_number to ccp + we don't want make acc_number as computed to have possibility set it + manually and also avoid to shadow other logic on acc_number if exist + """ if self.acc_type == 'iban': return diff --git a/l10n_ch_base_bank/models/invoice.py b/l10n_ch_base_bank/models/invoice.py index a0ee1181e..65f177f56 100644 --- a/l10n_ch_base_bank/models/invoice.py +++ b/l10n_ch_base_bank/models/invoice.py @@ -1,6 +1,6 @@ # Copyright 2012-2019 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, api, fields, _ +from odoo import models, api, _ from odoo.tools import mod10r from odoo import exceptions diff --git a/l10n_ch_base_bank/tests/test_search_invoice.py b/l10n_ch_base_bank/tests/test_search_invoice.py index 5685666d5..bb89b7d87 100644 --- a/l10n_ch_base_bank/tests/test_search_invoice.py +++ b/l10n_ch_base_bank/tests/test_search_invoice.py @@ -18,7 +18,7 @@ def setUp(self): bank_account = self.env['res.partner.bank'].create({ 'partner_id': self.company.partner_id.id, 'bank_id': bank.id, - 'acc_number': '01-1234-1', + 'acc_number': 'Bank/CCP 01-1234-1', }) self.company.partner_id.bank_ids = bank_account self.partner = self.env['res.partner'].create( @@ -29,7 +29,7 @@ def setUp(self): 'type': 'bank', 'code': 'BNK42', 'bank_id': bank.id, - 'bank_acc_number': '10-8060-7', + 'bank_acc_number': '01-1234-1', }) def assert_find_ref(self, reference, operator, value):