From d9e7bc545e3988b2af6e1b896286ba8673598c28 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 22 Jun 2023 16:07:32 +0530 Subject: [PATCH] fix: Do full rollback --- erpnext/controllers/stock_controller.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 903ef658e3..5137e03058 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -847,28 +847,24 @@ class StockController(AccountsController): @frappe.whitelist() def show_accounting_ledger_preview(company, doctype, docname): - frappe.db.savepoint("show_accounting_ledger_preview") - filters = {"company": company, "include_dimensions": 1} doc = frappe.get_doc(doctype, docname) gl_columns, gl_data = get_accounting_ledger_preview(doc, filters) - frappe.db.rollback(save_point="show_accounting_ledger_preview") + frappe.db.rollback() return {"gl_columns": gl_columns, "gl_data": gl_data} @frappe.whitelist() def show_stock_ledger_preview(company, doctype, docname): - frappe.db.savepoint("show_stock_ledger_preview") - filters = {"company": company} doc = frappe.get_doc(doctype, docname) sl_columns, sl_data = get_stock_ledger_preview(doc, filters) - frappe.db.rollback(save_point="show_stock_ledger_preview") + frappe.db.rollback() return { "sl_columns": sl_columns,