Files
account-financial-tools/account_tax_analysis/tests/test_account_vat_declaration_analysis.py
Denis Robinet (ACSONE) f8beaebc78 [10.0][MIG] account_tax_analysis
Change compared to 8.0:
* period_id has been replace by operations an the date field
* tax_code_id has been replaced by analysis_tax, a computed fields based an the tax analysis_name, based on description and name
2018-06-22 11:27:03 +02:00

41 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
# Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestAccountVatDeclarationAnalysis(TransactionCase):
def setUp(self):
super(TestAccountVatDeclarationAnalysis, self).setUp()
def test_1(self):
wiz = self.env["account.vat.declaration.analysis"].new()
wiz.start_date = "2017-01-01"
wiz.end_date = "2017-01-30"
self.assertEqual(
wiz.show_vat()["domain"],
[('date', '>=', '2017-01-01'), ('date', '<=', '2017-01-30')])
company = self.env.user.company_id
wiz.company_id = company
self.assertEqual(
wiz.show_vat()["domain"],
[('date', '>=', '2017-01-01'), ('date', '<=', '2017-01-30'),
("company_id", "=", company.id)])
wiz.target_move = "all"
self.assertEqual(
wiz.show_vat()["context"],
{'search_default_group_by_tax_type': 1})
wiz.target_move = "posted"
self.assertEqual(
wiz.show_vat()["context"],
{'search_default_group_by_tax_type': 1,
'search_default_posted': 1})