fix(stock): remove recalculate current qty function (#54774)

(cherry picked from commit b9e08f3ce4)

# Conflicts:
#	erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
This commit is contained in:
Sudharsanan Ashok
2026-05-20 11:37:26 +05:30
committed by Mergify
parent 0b41df5ac8
commit e53eaee297
3 changed files with 4 additions and 2 deletions

View File

@@ -1035,6 +1035,7 @@ class StockReconciliation(StockController):
else:
self._cancel()
<<<<<<< HEAD
def recalculate_current_qty(self, voucher_detail_no, sle_creation, add_new_sle=False):
from erpnext.stock.stock_ledger import get_valuation_rate
@@ -1115,6 +1116,8 @@ class StockReconciliation(StockController):
self.add_missing_stock_ledger_entry(row, voucher_detail_no, sle_creation)
=======
>>>>>>> b9e08f3ce4 (fix(stock): remove recalculate current qty function (#54774))
def add_missing_stock_ledger_entry(self, row, voucher_detail_no, sle_creation):
if row.current_qty == 0:
return

View File

@@ -1039,7 +1039,7 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin):
sr.reload()
self.assertTrue(sr.items[0].serial_and_batch_bundle)
self.assertTrue(sr.items[0].current_serial_and_batch_bundle)
self.assertFalse(sr.items[0].current_serial_and_batch_bundle)
def test_not_reconcile_all_batch(self):
from erpnext.stock.doctype.batch.batch import get_batch_qty

View File

@@ -1053,7 +1053,6 @@ class update_entries_after:
def reset_actual_qty_for_stock_reco(self, sle):
doc = frappe.get_doc("Stock Reconciliation", sle.voucher_no)
doc.recalculate_current_qty(sle.voucher_detail_no, sle.creation, sle.actual_qty > 0)
if sle.actual_qty < 0:
doc.reload()