From cf91c530ce874c0a35c2e918ea35d7edd1c1a55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 23 Mar 2023 10:27:28 +0100 Subject: [PATCH] Get today from ir.date in product cost history test scenario Since 8d4d6b810c72 the company has a timezone. Closes #12156 --- .../tests/scenario_product_cost_history.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/product_cost_history/tests/scenario_product_cost_history.rst b/modules/product_cost_history/tests/scenario_product_cost_history.rst index 4441a6f34a..0bd662b5f3 100644 --- a/modules/product_cost_history/tests/scenario_product_cost_history.rst +++ b/modules/product_cost_history/tests/scenario_product_cost_history.rst @@ -11,13 +11,13 @@ Imports:: >>> 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') + >>> Date = Model.get('ir.date') + Create company:: >>> _ = create_company() @@ -25,6 +25,9 @@ Create company:: >>> 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')