Skip to content

Commit

Permalink
[10.0][IMP] l10n_it_account_tax_kind (OCA#96)
Browse files Browse the repository at this point in the history
* [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
tafaRU authored and SimoRubi committed Aug 7, 2019
1 parent 4bbfff2 commit f7a78e6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
15 changes: 7 additions & 8 deletions l10n_it_account_tax_kind/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ With this module is possibile to set a kind of tax for every account tax you nee
Configuration
=============

To configure this module, you need to go to

Invoicing -> Configuration -> Taxes -> Account Tax Kind

and create a new kind of tax or modify existing one
To configure this module, you need to:

#. be a member of group "Accounting & Finance / Adviser"
#. go to Invoicing -> Configuration -> Taxes -> Italian Localization -> Account Tax Kind
#. create a new kind of tax or modify existing one

Usage
=====

To use this module, you need to:

#. Go to Invoicing -> Configuration -> Taxes -> Taxes

open the tax to modify and set a Kind value
#. go to Invoicing -> Configuration -> Accounting -> Taxes
#. open the tax to modify, go to "Advanced Options" tab and set a Kind value

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
Expand All @@ -55,6 +53,7 @@ Contributors

* Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Alex Comba <alex.comba@agilebg.com>

Do not contact contributors directly about support or help with technical issues.

Expand Down
2 changes: 1 addition & 1 deletion l10n_it_account_tax_kind/model/__init__.py
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.
1 change: 1 addition & 0 deletions l10n_it_account_tax_kind/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_account_tax_kind
22 changes: 22 additions & 0 deletions l10n_it_account_tax_kind/tests/test_account_tax_kind.py
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)

0 comments on commit f7a78e6

Please sign in to comment.