diff options
| author | oco-odoo <oco@odoo.com> | 2020-06-22 15:46:38 +0000 |
|---|---|---|
| committer | oco-odoo <oco@odoo.com> | 2020-06-29 13:30:19 +0000 |
| commit | f45131b9959cedd116b46ce12583856b50231500 (patch) | |
| tree | 14be7532770522d7c4ccfed36c4924e0a6e587bb /addons | |
| parent | 350e0ff6e61ef1dd972af2e78b65f4b33979852f (diff) | |
[FIX] l10n_ch: fix tests
closes odoo/odoo#53809
X-original-commit: 157ffe55acd077d7c62007e35c1b145411734a2c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_ch/tests/test_l10n_ch_isr.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/l10n_ch/tests/test_l10n_ch_isr.py b/addons/l10n_ch/tests/test_l10n_ch_isr.py index 541a2d7e0e5..5879e92c3a8 100644 --- a/addons/l10n_ch/tests/test_l10n_ch_isr.py +++ b/addons/l10n_ch/tests/test_l10n_ch_isr.py @@ -32,10 +32,12 @@ class ISRTest(AccountTestCommon): def create_account(self, number): """ Generates a test res.partner.bank. """ - return self.env['res.partner.bank'].create({ + rslt = self.env['res.partner.bank'].create({ 'acc_number': number, 'partner_id': self.env.ref("base.res_partner_2").id, }) + rslt._onchange_set_l10n_ch_postal() + return rslt def create_isr_issuer_account(self, number): """ Generates a test res.partner.bank on company """ @@ -80,7 +82,7 @@ class ISRTest(AccountTestCommon): #A non-swiss IBAN must not allow the computation of a postal reference account_test_iban_wrong = self.create_account('GR1601101250000000012300695') self.assertEqual(account_test_iban_wrong.acc_type, 'iban', "The IBAN must be valid") - self.assertFalse(account_test_iban_wrong.l10n_ch_postal, "A valid swiss IBAN should set the postal reference") + self.assertFalse(account_test_iban_wrong.l10n_ch_postal, "Only a valid swiss IBAN should set the postal reference") def test_isr(self): #Let us test the generation of an ISR for an invoice, first by showing an |
