[minor] catch duplicate entry error in bank account creation
This commit is contained in:
parent
467f5c7a75
commit
6bd9f7f5f0
@ -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"))):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user