mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
[minor] catch duplicate entry error in bank account creation
This commit is contained in:
@@ -129,6 +129,9 @@ def create_bank_account(args):
|
|||||||
return bank_account.insert()
|
return bank_account.insert()
|
||||||
except RootNotEditable:
|
except RootNotEditable:
|
||||||
frappe.throw(_("Bank account cannot be named as {0}").format(args.get("bank_account")))
|
frappe.throw(_("Bank account cannot be named as {0}").format(args.get("bank_account")))
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
# bank account same as a CoA entry
|
||||||
|
pass
|
||||||
|
|
||||||
def create_price_lists(args):
|
def create_price_lists(args):
|
||||||
for pl_type, pl_name in (("Selling", _("Standard Selling")), ("Buying", _("Standard Buying"))):
|
for pl_type, pl_name in (("Selling", _("Standard Selling")), ("Buying", _("Standard Buying"))):
|
||||||
|
|||||||
Reference in New Issue
Block a user