From 9beb9697f38a8150068d8a040340bdedee3c6c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 23 Jan 2022 12:54:56 +0100 Subject: [PATCH] Ensure to set correct company context when calling today issue11046 review370421002 --- purchase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/purchase.py b/purchase.py index c202c401cc..da3bf0c2b2 100644 --- a/purchase.py +++ b/purchase.py @@ -416,7 +416,8 @@ class PurchaseRequestQuotationReport(CompanyReport): pool = Pool() Date = pool.get('ir.date') context = super().get_context(records, header, data) - context['today'] = Date.today() + with Transaction().set_context(company=header['company'].id): + context['today'] = Date.today() return context