Recurssion error maximum recurssion depth exceed comparession

we are created the summited doctype ,the save button was working and summited button clicked

    POST http://127.0.0.1/api/method/frappe.desk.form.save.savedocs 500 (INTERNAL SERVER ERROR)

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 95, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 47, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1622, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/form/save.py”, line 28, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 307, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 358, in _save
self.run_post_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1093, in run_post_save_methods
self.run_method(“on_submit”)
File “apps/frappe/frappe/model/document.py”, line 917, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1279, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1261, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 914, in fn
return method_object(*args, **kwargs)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 53, in on_submit
self.update_stock_ledger()
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 285, in update_stock_ledger
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init
self.build()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 443, in build
self.process_sle_against_current_timestamp()
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 466, in process_sle_against_current_timestamp
self.process_sle(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 575, in process_sle
self.reset_actual_qty_for_stock_reco(sle)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 640, in reset_actual_qty_for_stock_reco
print(doc)
File “apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py”, line 616, in recalculate_current_qty
self.make_sl_entries(sl_entries, allow_negative_stock=self.has_negative_stock_allowed())
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 513, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 86, in make_sl_entries
repost_current_voucher(args, allow_negative_stock, via_landed_cost_voucher)
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 102, in repost_current_voucher
update_entries_after(
File “apps/erpnext/erpnext/stock/stock_ledger.py”, line 395, in init