Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
75b9b78d by Cédric Krier at 2023-04-03T01:17:03+02:00
Test on forecast record name fails after 31 March 2023
The test was added with 3b15c1378292 but as there is a computed active field
on forecast based on the "to date", the search by record name does
not find
any active record.
- - - - -
1 changed file:
- modules/stock_forecast/tests/test_module.py
Changes:
=====================================
modules/stock_forecast/tests/test_module.py
=====================================
@@ -10,7 +10,7 @@
CompanyTestMixin, create_company, set_company)
from trytond.pool import Pool
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
-from trytond.transaction import Transaction
+from trytond.transaction import Transaction, inactive_records
class StockForecastTestCase(CompanyTestMixin, ModuleTestCase):
@@ -35,7 +35,8 @@
to_date=datetime.date(2023, 3, 31),
)
forecast.save()
- forecasts = Forecast.search([('rec_name', '=', "Warehouse")])
+ with inactive_records():
+ forecasts = Forecast.search([('rec_name', '=', "Warehouse")])
self.assertEqual(
forecast.rec_name,
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/75b9b78d3299a546f736ce33f56f28184811abaf
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/75b9b78d3299a546f736ce33f56f28184811abaf
You're receiving this email because of your account on foss.heptapod.net.