Debian Codegraph @

addons/l10n_it_edi/tests/test_edi_address.py

raw symbols SCIP
1 from odoo.tests import tagged
2
3 from odoo.addons.base.tests.common import HttpCaseWithUserPortal
4 from odoo.addons.l10n_it_edi.tests.common import TestItEdi
5
6
7 @tagged('post_install_l10n', 'post_install', '-at_install')
8 class TestUi(HttpCaseWithUserPortal, TestItEdi):
9 def test_portal_user_codice_fiscale(self):
10 self.env.company.country_id = self.env.ref('base.it')
11 it_user_portal = self._create_new_portal_user(name='IT User')
12 # If website is installed, the website's company (main_company) should also have country as Italy
13 company = self.env.ref('base.main_company')
14 company.account_fiscal_country_id = company.country_id = self.env.company.country_id
15
16 self.start_tour("/my", 'portal_compute_codice_fiscale', login="portal_user")
17 self.assertEqual(
18 it_user_portal.l10n_it_codice_fiscale,
19 '12345670017',
20 "The user should have the Codice Fiscale filled according to the VAT",
21 )