book, line, category, types: berechtigung für company-user + test,

book: währung neu,
line: buchungstyp, betrag, credit, debit, währung, sortierung
This commit is contained in:
Frederik Jaeckel 2022-08-10 16:30:08 +02:00
parent 1a85b8e80e
commit d57d76ba3b
20 changed files with 620 additions and 115 deletions

View file

@ -7,7 +7,6 @@ from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.pool import Pool
from trytond.transaction import Transaction
from trytond.exceptions import UserError
from trytond.modules.company.tests import create_company
class CategoryTestCase(ModuleTestCase):
@ -21,12 +20,7 @@ class CategoryTestCase(ModuleTestCase):
Company = pool.get('company.company')
Category = pool.get('cashbook.category')
company = Company.search([])
if len(company) > 0:
company = company[0]
else :
company = create_company(name='m-ds')
company = self.prep_company()
category, = Category.create([{
'company': company.id,
'name': name,
@ -40,7 +34,7 @@ class CategoryTestCase(ModuleTestCase):
pool = Pool()
Category = pool.get('cashbook.category')
company = create_company(name='m-ds')
company = self.prep_company()
with Transaction().set_context({
'company': company.id,
@ -73,7 +67,7 @@ class CategoryTestCase(ModuleTestCase):
pool = Pool()
Category = pool.get('cashbook.category')
company = create_company(name='m-ds')
company = self.prep_company()
with Transaction().set_context({
'company': company.id,
@ -100,7 +94,7 @@ class CategoryTestCase(ModuleTestCase):
pool = Pool()
Category = pool.get('cashbook.category')
company = create_company(name='m-ds')
company = self.prep_company()
with Transaction().set_context({
'company': company.id,
@ -126,7 +120,7 @@ class CategoryTestCase(ModuleTestCase):
Account = pool.get('account.account')
Category = pool.get('cashbook.category')
company = create_company(name='m-ds')
company = self.prep_company()
with Transaction().set_context({
'company': company.id,