summaryrefslogtreecommitdiff
path: root/addons/l10n_ch/tests
diff options
context:
space:
mode:
authorsed-odoo <sed@odoo.com>2018-09-04 08:34:41 +0200
committersed-odoo <sed@odoo.com>2018-09-20 09:41:06 +0200
commit3a883e67287cbf0c93a746bc2080b897f2c87bfa (patch)
tree86924a931dc0045143646cc0c1d0e198dc09339b /addons/l10n_ch/tests
parentc59d6d2329494705a5f9dd5ef6a1b0e2c43f8e38 (diff)
[IMP] l10n_ch,account,website_sale: Add SwissQR Code on invoice and improve the SEPA QR Code usability
Purpose ======= - Add the SwissQR Code on the invoice in aim to replace the actual ISR - Improve the settings of the SEPA QR Code to make it more user friendly Specifications ============== - ln_ch: - Add a SwissQR Code on the invoice to fit the Switzerland QR-Bill Format - Use the "partner_bank_id" field to generate the QR Code - Add function to get the address number out of the field "street" and "street2" - account: - Remove the SEPA QR Code's journal settings from the general setting - Display the "partner_bank_id" field on the invoice "Other info" page - Use the "partner_bank_id" field to generate the QR Code - website_sale: - Add a check box on the payment acquirers to use the SEPA QR Code on the e-commerce - Use the payment acquirer "journal_id" field to generate the SEPA QR Code
Diffstat (limited to 'addons/l10n_ch/tests')
-rw-r--r--addons/l10n_ch/tests/__init__.py3
-rw-r--r--addons/l10n_ch/tests/test_l10n_ch_swissqr.py20
2 files changed, 22 insertions, 1 deletions
diff --git a/addons/l10n_ch/tests/__init__.py b/addons/l10n_ch/tests/__init__.py
index f36cc8f091c..041c87e8043 100644
--- a/addons/l10n_ch/tests/__init__.py
+++ b/addons/l10n_ch/tests/__init__.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from . import test_l10n_ch_isr \ No newline at end of file
+from . import test_l10n_ch_isr
+from . import test_l10n_ch_swissqr
diff --git a/addons/l10n_ch/tests/test_l10n_ch_swissqr.py b/addons/l10n_ch/tests/test_l10n_ch_swissqr.py
new file mode 100644
index 00000000000..68e91ca6466
--- /dev/null
+++ b/addons/l10n_ch/tests/test_l10n_ch_swissqr.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo.tests.common import TransactionCase
+from odoo.tests import tagged
+
+@tagged('post_install', '-at_install')
+class SwissQRTest(TransactionCase):
+
+ def test_abc_1(self):
+ assert self.env['res.partner.bank'].find_number('1 rue du bois communal') == '1'
+ assert self.env['res.partner.bank'].find_number('1bis rue du bois communal') == '1bis'
+ assert self.env['res.partner.bank'].find_number('rue du bois communal 1') == '1'
+ assert self.env['res.partner.bank'].find_number('rue du bois communal 1bis') == '1bis'
+ assert self.env['res.partner.bank'].find_number('1 rue du 9 mars 1962') == '1'
+ assert self.env['res.partner.bank'].find_number('rue du 9 mars 1962 1') == '1'
+ assert self.env['res.partner.bank'].find_number('1bis rue du 9 mars 1962') == '1bis'
+ assert self.env['res.partner.bank'].find_number('rue du 9 mars 1962 1bis') == '1bis'
+ assert self.env['res.partner.bank'].find_number('rue du 9 mars 1962') == '1962'
+ assert self.env['res.partner.bank'].find_number('rue du 9 mars 1962 4 boite 2') == '2'