File: common.py

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (33 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo.tests import tagged
from odoo.addons.l10n_it_edi.tests.common import TestItEdi


@tagged('post_install_l10n', 'post_install', '-at_install')
class TestItEdiDoi(TestItEdi):

    @classmethod
    @TestItEdi.setup_country('it')
    def setUpClass(cls):
        super().setUpClass()

        cls.declaration_1000 = cls.env['l10n_it_edi_doi.declaration_of_intent'].create({
            'company_id': cls.company.id,
            'partner_id': cls.italian_partner_a.id,
            'issue_date': '2019-01-01',
            'start_date': '2019-01-01',
            'end_date': '2019-12-31',
            'threshold': 1000,
            'protocol_number_part1': 'test 2019',
            'protocol_number_part2': 'threshold 1000',
        })
        cls.declaration_1000.action_validate()

        cls.product_1 = cls.env['product.product'].create([{'name': 'test product 1'}])

        cls.pricelist = cls.env['product.pricelist'].with_company(cls.company).create({
            'name': 'EUR pricelist',
            'currency_id': cls.company.currency_id.id,
            'company_id': False,
        })