From 6863b03790330288f026f4003d2743fa7cc97992 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 17 Jul 2018 17:20:15 +0530 Subject: [PATCH] Naming series increase even if there is an exception while saving the invoice from the backend (#14938) --- erpnext/accounts/doctype/sales_invoice/pos.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 63db16ca557..a5157240ac0 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -507,5 +507,6 @@ def save_invoice(doc, name, name_list): name_list.append(name) except Exception: frappe.log_error(frappe.get_traceback()) + frappe.db.rollback() return name_list