forked from OCA/l10n-italy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10.0][IMP] l10n_it_account_tax_kind (OCA#96)
* [FIX] l10n_it_account_tax_kind: fix README * [IMP] l10n_it_account_tax_kind: rename file according to the model name * [ADD] l10n_it_account_tax_kind: add tests
- Loading branch information
Showing
5 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from . import account_tax | ||
from . import account_tax_kind | ||
from . import account |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_account_tax_kind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 Alex Comba - Agile Business Group | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestAccountTaxKind(TransactionCase): | ||
|
||
def setUp(self): | ||
super(TestAccountTaxKind, self).setUp() | ||
self.tax_kind_n1 = self.env.ref('l10n_it_account_tax_kind.n1') | ||
|
||
def test_compute_display_name(self): | ||
self.tax_kind_n1._compute_display_name() | ||
self.assertEqual( | ||
self.tax_kind_n1.display_name, | ||
u'[%s] %s' % (self.tax_kind_n1.code, self.tax_kind_n1.name)) | ||
|
||
def test_name_search(self): | ||
result = self.env['account.tax.kind'].name_search('Escluse ex art. 15') | ||
self.assertEqual(result and result[0][0], self.tax_kind_n1.id) |