diff --git a/controllers/stock_controller.py b/controllers/stock_controller.py index 2bf635ba06..c54fbb44cd 100644 --- a/controllers/stock_controller.py +++ b/controllers/stock_controller.py @@ -87,7 +87,9 @@ class StockController(AccountsController): def delete_and_repost_sle(self): """ Delete Stock Ledger Entries related to this voucher and repost future Stock Ledger Entries""" - + + from stock.stock_ledger import update_entries_after + existing_entries = webnotes.conn.sql("""select distinct item_code, warehouse from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""", (self.doc.doctype, self.doc.name), as_dict=1) diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py index 63e90ab696..227d773ff2 100644 --- a/stock/doctype/delivery_note/delivery_note.py +++ b/stock/doctype/delivery_note/delivery_note.py @@ -290,7 +290,7 @@ class DocType(SellingController): for d in self.get_item_list(): if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == "Yes" \ and d.warehouse: - self.update_reserved_qty() + self.update_reserved_qty(d) if self.doc.docstatus == 1: sl_entries.append(self.get_sl_entries(d, { diff --git a/stock/stock_ledger.py b/stock/stock_ledger.py index 457a0661f2..3bb3a00faa 100644 --- a/stock/stock_ledger.py +++ b/stock/stock_ledger.py @@ -28,7 +28,7 @@ def make_entry(args): sle = webnotes.bean([args]) sle.ignore_permissions = 1 sle.insert() - sle.submit() + # sle.submit() return sle.doc.name _exceptions = []