fix: Recreate Stock Ledgers issue

(cherry picked from commit 229a4cef45)
This commit is contained in:
Rohit Waghchaure
2025-04-09 12:37:02 +05:30
committed by Mergify
parent 860aba47ef
commit b819e0a61b
4 changed files with 13 additions and 9 deletions

View File

@@ -558,7 +558,7 @@ class SellingController(StockController):
self.doctype, self.name, d.item_code, self.return_against, item_row=d
)
def update_stock_ledger(self):
def update_stock_ledger(self, allow_negative_stock=False):
self.update_reserved_qty()
sl_entries = []
@@ -588,7 +588,7 @@ class SellingController(StockController):
):
sl_entries.append(self.get_sle_for_source_warehouse(d))
self.make_sl_entries(sl_entries)
self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock)
def get_sle_for_source_warehouse(self, item_row):
serial_and_batch_bundle = (