Debian Codegraph @

addons/l10n_in_pos/tests/test_hsn_summary.py

raw
1 from odoo.addons.account.tests.common import AccountTestInvoicingCommon
2 from odoo.addons.l10n_in.tests.test_hsn_summary import TestL10nInHSNSummary
3 from odoo.addons.point_of_sale.tests.test_frontend import TestTaxCommonPOS
4 from odoo.tests import tagged
5
6
7 @tagged('post_install', '-at_install', 'post_install_l10n')
8 class TestL10nInHSNSummaryPos(TestTaxCommonPOS, TestL10nInHSNSummary):
9
10 @classmethod
11 @AccountTestInvoicingCommon.setup_country('in')
12 def setUpClass(cls):
13 super().setUpClass()
14
15 def create_base_line_product(self, base_line, **kwargs):
16 # OVERRIDE 'point_of_sale'
17 return super().create_base_line_product(base_line, **kwargs, l10n_in_hsn_code=base_line['l10n_in_hsn_code'])
18
19 def test_l10n_in_hsn_summary_pos(self):
20 # We only do the first test just to be sure the code is not crashing.
21 # There is no custom code in the POS for that so we suppose the results
22 # are exactly the same.
23 tests = self._test_l10n_in_hsn_summary_1()
24 test1 = next(tests)
25 self.ensure_products_on_document(test1[1], 'product_1')
26 with self.with_new_session(user=self.pos_user):
27 self.start_pos_tour('test_l10n_in_hsn_summary_pos')