[FIX] account: Fix error message for registering payment invoice and bill at the same time
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) <jbw@odoo.com> Signed-off-by: Seif Gneedy (segn) <segn@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user