Skip to content

Commit

Permalink
add tooltip to create group of taxes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukio committed Apr 17, 2019
1 parent e46f488 commit 0285a2d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# this repository contains the full copyright notices and license terms.

try:
from trytond.modules.account_invoice_ar.tests.tests import suite
from trytond.modules.account_invoice_ar.tests.test_account_invoice_ar import suite
except ImportError:
from .tests import suite
from .test_account_invoice_ar import suite

__all__ = ['suite']
File renamed without changes.
16 changes: 16 additions & 0 deletions tests/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,19 @@ def get_invoice_types(company=None, pos=None, config=None):
])
invoice_types = {i.invoice_type: i for i in invoice_types}
return invoice_types


def create_tax_groups(company=None, config=None):
"Create tax groups"
TaxGroup = Model.get('account.tax.group', config=config)
types = ['iva', 'nacional', 'iibb', 'municipal', 'interno']
groups = {}

for type in types:
group = TaxGroup()
group.name = type
group.code = type
group.kind = 'both'
group.save()
groups[type] = group
return groups

0 comments on commit 0285a2d

Please sign in to comment.