From ce04f50ed56d5ed9e2e293d13e9cd8b4f70cb436 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 --- dunning.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dunning.py b/dunning.py index 23c333fde6..306b59076f 100644 --- a/dunning.py +++ b/dunning.py @@ -80,7 +80,8 @@ class Letter(CompanyReport, metaclass=PoolMeta): letters[party] = PartyLetter(dunnings=current_dunnings, payments=current_payments) report_context['letters'] = letters - report_context['today'] = Date.today() + with Transaction().set_context(company=header.get('company')): + report_context['today'] = Date.today() report_context['get_payment_amount'] = cls.get_payment_amount report_context['get_payment_currency'] = cls.get_payment_currency return report_context