Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
03f94101 by Cédric Krier at 2023-03-23T10:27:28+01:00
Get today from ir.date in product cost history test scenario
Since 8d4d6b810c72 the company has a timezone.
Closes #12156
- - - - -
1 changed file:
- modules/product_cost_history/tests/scenario_product_cost_history.rst
Changes:
=====================================
modules/product_cost_history/tests/scenario_product_cost_history.rst
=====================================
@@ -11,10 +11,8 @@
>>> from trytond.tests.tools import activate_modules
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
- >>> today = dt.date.today()
- >>> now = dt.datetime.now()
Activate modules::
>>> config = activate_modules('product_cost_history')
@@ -16,8 +14,10 @@
Activate modules::
>>> config = activate_modules('product_cost_history')
+ >>> Date = Model.get('ir.date')
+
Create company::
>>> _ = create_company()
@@ -25,6 +25,9 @@
>>> company.timezone = 'Europe/Madrid'
>>> company.save()
+ >>> today = Date.today(config.context)
+ >>> now = dt.datetime.combine(today, dt.time())
+
Create product::
>>> ProductUom = Model.get('product.uom')
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/03f941013d05e6c8d03837c7987272c3d8d1e890
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/03f941013d05e6c8d03837c7987272c3d8d1e890
You're receiving this email because of your account on foss.heptapod.net.