From e0abb7e7fb01a0c99e1e17e5de4a02a932d40d21 Mon Sep 17 00:00:00 2001 From: "Seif (segn)" Date: Wed, 17 Apr 2024 08:06:55 +0000 Subject: [PATCH] [FIX] account: Fix error message for registering payment invoice and bill at the same time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When registering payment for customer invoices and vendor bills at the same time, a misleading error message appears"You can't register payments for journal eithers being both inbound and outbound". Replacing it with a clear message "You can't register payments for both inbound and outbound moves at the same time." Task id: 3638740 closes odoo/odoo#162464 X-original-commit: a18cb2ebb133c2e4b72ddd5d8cda23d2b71006dd Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) Signed-off-by: Seif Gneedy (segn) --- addons/account/i18n/account.pot | 4 ++-- addons/account/wizard/account_payment_register.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 34f55436b29..b1c6cef056b 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -15865,8 +15865,8 @@ msgstr "" #: code:addons/account/wizard/account_payment_register.py:0 #, python-format msgid "" -"You can't register payments for journal items being either all inbound, " -"either all outbound." +"You can't register payments for both inbound and outbound moves " +"at the same time." msgstr "" #. module: account diff --git a/addons/account/wizard/account_payment_register.py b/addons/account/wizard/account_payment_register.py index d3b8a4212d3..682ed6f0e1a 100644 --- a/addons/account/wizard/account_payment_register.py +++ b/addons/account/wizard/account_payment_register.py @@ -668,7 +668,7 @@ class AccountPaymentRegister(models.TransientModel): if len(lines.company_id.root_id) > 1: raise UserError(_("You can't create payments for entries belonging to different companies.")) if len(set(available_lines.mapped('account_type'))) > 1: - raise UserError(_("You can't register payments for journal items being either all inbound, either all outbound.")) + raise UserError(_("You can't register payments for both inbound and outbound moves at the same time.")) res['line_ids'] = [(6, 0, available_lines.ids)]