Merge pull request #22283 from marination/expense-account-message-develop

fix: Message Formatting for missing Expense Account
This commit is contained in:
Marica 2020-06-17 14:01:10 +05:30 committed by GitHub
commit 10d8aa0225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,7 +227,9 @@ class StockController(AccountsController):
def check_expense_account(self, item):
if not item.get("expense_account"):
frappe.throw(_("Expense Account not set for Item {0}. Please set an Expense Account for the item in the Items table").format(item.item_code))
frappe.throw(_("Row #{0}: Expense Account not set for Item {1}. Please set an Expense \
Account in the Items table").format(item.idx, frappe.bold(item.item_code)),
title=_("Expense Account Missing"))
else:
is_expense_account = frappe.db.get_value("Account",