details: https://code.tryton.org/tryton/commit/da67ac302d64
branch: default
user: Cédric Krier <[email protected]>
date: Wed Dec 31 16:07:02 2025 +0100
description:
Use the normalized format for the warning key regarding overpayment
diffstat:
modules/account_payment/payment.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 496c94e82df2 -r da67ac302d64 modules/account_payment/payment.py
--- a/modules/account_payment/payment.py Tue Jan 06 22:30:59 2026 +0100
+++ b/modules/account_payment/payment.py Wed Dec 31 16:07:02 2025 +0100
@@ -857,8 +857,9 @@
for payment in payments:
if payment.line and payment.line.payment_amount < 0:
- if Warning.check(str(payment)):
- raise OverpayWarning(str(payment),
+ key = Warning.format('overpay', [payment])
+ if Warning.check(key):
+ raise OverpayWarning(key,
gettext('account_payment.msg_payment_overpay',
payment=payment.rec_name,
line=payment.line.rec_name))