From b1641da4ef0d58c81dcfaf9176e6d0e0c49a9ee7 Mon Sep 17 00:00:00 2001 From: Simone Rubino Date: Thu, 7 Dec 2023 11:10:37 +0100 Subject: [PATCH] [REF] l10n_it_withholding_tax_payment: Reformatted after template update --- .../models/withholding_tax.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/l10n_it_withholding_tax_payment/models/withholding_tax.py b/l10n_it_withholding_tax_payment/models/withholding_tax.py index e60bfd5e1be7..9cec256cc33f 100644 --- a/l10n_it_withholding_tax_payment/models/withholding_tax.py +++ b/l10n_it_withholding_tax_payment/models/withholding_tax.py @@ -153,8 +153,11 @@ def generate_from_moves(self, wt_moves): for wt_move in wt_moves: if wt_move.state == "paid": raise ValidationError( - _("WT move already paid! - {} - {} - {}").format( - wt_move.partner_id.name, wt_move.date, str(wt_move.amount) + _( + "WT move already paid! - %(partner)s - %(date)s - %(amount)s", + partner=wt_move.partner_id.name, + date=wt_move.date, + amount=str(wt_move.amount), ) ) @@ -162,12 +165,12 @@ def generate_from_moves(self, wt_moves): raise ValidationError( _( "WT move already in a payment move! " - "Paym. move {} - Ref WT: {} - {} - {}" - ).format( - str(wt_move.wt_move_payment_id.id), - wt_move.partner_id.name, - wt_move.date, - str(wt_move.amount), + "Paym. move %(move)s - " + "Ref WT: %(partner)s - %(date)s - %(amount)s", + move=str(wt_move.wt_move_payment_id.id), + partner=wt_move.partner_id.name, + date=wt_move.date, + amount=str(wt_move.amount), ) )