Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
f2fa06a4 by Cédric Krier at 2022-12-24T17:49:47+01:00
Do not use closed account in test tools
Closes #11932
- - - - -
1 changed file:
- modules/account/tests/tools.py
Changes:
=====================================
modules/account/tests/tools.py
=====================================
@@ -3,4 +3,5 @@
import datetime
from dateutil.relativedelta import relativedelta
+
from proteus import Model, Wizard
@@ -6,5 +7,4 @@
from proteus import Model, Wizard
-
from trytond.modules.company.tests.tools import get_company
__all__ = ['create_fiscalyear', 'create_chart', 'get_accounts',
@@ -85,6 +85,7 @@
accounts[type], = Account.find([
('type.%s' % type, '=', True),
('company', '=', company.id),
+ ('closed', '!=', True),
], limit=1)
except ValueError:
pass
@@ -92,6 +93,7 @@
accounts['cash'], = Account.find([
('company', '=', company.id),
('name', '=', 'Main Cash'),
+ ('closed', '!=', True),
], limit=1)
except ValueError:
pass
@@ -99,6 +101,7 @@
accounts['tax'], = Account.find([
('company', '=', company.id),
('name', '=', 'Main Tax'),
+ ('closed', '!=', True),
], limit=1)
except ValueError:
pass
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/f2fa06a437515a0cc80553797bc0ff93ed9646b5
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/f2fa06a437515a0cc80553797bc0ff93ed9646b5
You're receiving this email because of your account on foss.heptapod.net.