From e5adddcf36a2dbd0644561cf9631b201fc91b9fc Mon Sep 17 00:00:00 2001 From: Daniil Digtyar Vasilieva <daniildigtyar@gmail.com> Date: Wed, 1 Nov 2023 16:29:00 +0100 Subject: [PATCH] [IMP] energy_selfconsumption: updated text on validation error --- energy_selfconsumption/wizards/invoicing_wizard.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/energy_selfconsumption/wizards/invoicing_wizard.py b/energy_selfconsumption/wizards/invoicing_wizard.py index d39121f78..90293107b 100644 --- a/energy_selfconsumption/wizards/invoicing_wizard.py +++ b/energy_selfconsumption/wizards/invoicing_wizard.py @@ -21,7 +21,16 @@ class InvoicingWizard(models.TransientModel): ) if not all_equal_period: raise ValidationError( - _("Select only contracts with the same period of invoicing.") + _( + """ +Select only contracts with the same period of invoicing. +Make sure that all the selected contracts have the same next period start and end. +Next period start: {next_period_date_start} +Next period end: {next_period_date_end}""" + ).format( + next_period_date_start=contract_list[0].next_period_date_start, + next_period_date_end=contract_list[0].next_period_date_end, + ) ) def generate_invoices(self): -- GitLab