Skip to content

Commit

Permalink
fixup! [IMP] updates for partenr_banks_to_show method
Browse files Browse the repository at this point in the history
  • Loading branch information
Iryna Vyshnevska committed Apr 18, 2019
1 parent bd64974 commit 42b788c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions l10n_ch_base_bank/models/bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion l10n_ch_base_bank/models/invoice.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions l10n_ch_base_bank/tests/test_search_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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):
Expand Down

0 comments on commit 42b788c

Please sign in to comment.