| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from odoo.tests import tagged |
| 4 |
from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon |
| 5 |
|
| 6 |
|
| 7 |
class Testl10nFrPosCert(TestPointOfSaleHttpCommon): |
| 8 |
@classmethod |
| 9 |
def setUpClass(cls): |
| 10 |
super().setUpClass() |
| 11 |
company = cls.main_pos_config.company_id |
| 12 |
company.country_id = cls.env.ref("base.fr") |
| 13 |
company.point_of_sale_use_ticket_qr_code = True |
| 14 |
company.point_of_sale_ticket_portal_url_display_mode = 'qr_code_and_url' |
| 15 |
|
| 16 |
|
| 17 |
@tagged("post_install_l10n", "post_install", "-at_install") |
| 18 |
class TestUi(Testl10nFrPosCert): |
| 19 |
def test_pos_use_ticket_qr_code_for_fr(self): |
| 20 |
company = self.main_pos_config.company_id |
| 21 |
self.assertEqual(company.country_id.code, "FR", "Company should be set to France (FR)") |
| 22 |
self.main_pos_config.with_user(self.pos_user).open_ui() |
| 23 |
self.start_pos_tour("l10nFrPosCertSelfInvoicingTour", login="pos_user") |
| 24 |
|
| 25 |
def test_correct_old_price_upon_price_change_fr(self): |
| 26 |
company = self.main_pos_config.company_id |
| 27 |
self.assertEqual(company.country_id.code, "FR", "Company should be set to France (FR)") |
| 28 |
self.main_pos_config.with_user(self.pos_user).open_ui() |
| 29 |
self.start_pos_tour("test_correct_old_price_upon_price_change_fr", login="pos_user") |