utilities/repost_stock file renamed to stock/stock_balance
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index b1c0a58..58b1d19 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -9,7 +9,7 @@
from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
from erpnext.stock.doctype.item.item import get_last_purchase_details
-from erpnext.utilities.repost_stock import update_bin_qty, get_ordered_qty
+from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty
form_grid_templates = {
diff --git a/erpnext/patches/repair_tools/set_stock_balance_as_per_serial_no.py b/erpnext/patches/repair_tools/set_stock_balance_as_per_serial_no.py
index 4a4266e..5a421d1 100644
--- a/erpnext/patches/repair_tools/set_stock_balance_as_per_serial_no.py
+++ b/erpnext/patches/repair_tools/set_stock_balance_as_per_serial_no.py
@@ -5,7 +5,7 @@
import frappe
def execute():
- from erpnext.utilities.repost_stock import set_stock_balance_as_per_serial_no
+ from erpnext.stock.stock_balance import set_stock_balance_as_per_serial_no
frappe.db.auto_commit_on_many_writes = 1
set_stock_balance_as_per_serial_no()
diff --git a/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py b/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py
index 73a56a8..0df5801 100644
--- a/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py
+++ b/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py
@@ -6,7 +6,7 @@
from frappe.utils import flt
def execute():
- from erpnext.utilities.repost_stock import repost
+ from erpnext.stock.stock_balance import repost
repost(allow_zero_rate=True, only_actual=True)
frappe.reload_doctype("Account")
diff --git a/erpnext/patches/v4_2/repost_reserved_qty.py b/erpnext/patches/v4_2/repost_reserved_qty.py
index a2cd4d8..74f4b79 100644
--- a/erpnext/patches/v4_2/repost_reserved_qty.py
+++ b/erpnext/patches/v4_2/repost_reserved_qty.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe
-from erpnext.utilities.repost_stock import update_bin_qty, get_reserved_qty
+from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty
def execute():
repost_for = frappe.db.sql("""
diff --git a/erpnext/patches/v4_2/update_requested_and_ordered_qty.py b/erpnext/patches/v4_2/update_requested_and_ordered_qty.py
index 240b11d..7bb49e6 100644
--- a/erpnext/patches/v4_2/update_requested_and_ordered_qty.py
+++ b/erpnext/patches/v4_2/update_requested_and_ordered_qty.py
@@ -5,7 +5,7 @@
import frappe
def execute():
- from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty, get_ordered_qty
+ from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty, get_ordered_qty
count=0
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse from
diff --git a/erpnext/patches/v5_0/repost_requested_qty.py b/erpnext/patches/v5_0/repost_requested_qty.py
index 8c1d6f7..6af71f3 100644
--- a/erpnext/patches/v5_0/repost_requested_qty.py
+++ b/erpnext/patches/v5_0/repost_requested_qty.py
@@ -5,7 +5,7 @@
import frappe
def execute():
- from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty
+ from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
count=0
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse
diff --git a/erpnext/patches/v5_4/fix_reserved_qty_and_sle_for_packed_items.py b/erpnext/patches/v5_4/fix_reserved_qty_and_sle_for_packed_items.py
index 251dd56..6eb3994 100644
--- a/erpnext/patches/v5_4/fix_reserved_qty_and_sle_for_packed_items.py
+++ b/erpnext/patches/v5_4/fix_reserved_qty_and_sle_for_packed_items.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe
-from erpnext.utilities.repost_stock import repost_actual_qty
+from erpnext.stock.stock_balance import repost_actual_qty
def execute():
cancelled_invoices = frappe.db.sql_list("""select name from `tabSales Invoice`
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 4f9d54d..dd21f05 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -8,7 +8,7 @@
from frappe.utils import cstr, flt, getdate, comma_and
from frappe import _
from frappe.model.mapper import get_mapped_doc
-from erpnext.utilities.repost_stock import update_bin_qty, get_reserved_qty
+from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty
from erpnext.controllers.selling_controller import SellingController
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 659fb1b..08350af 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -269,7 +269,7 @@
frappe.db.set_value("Item", newdn, "last_purchase_rate", last_purchase_rate)
def recalculate_bin_qty(self, newdn):
- from erpnext.utilities.repost_stock import repost_stock
+ from erpnext.stock.stock_balance import repost_stock
frappe.db.auto_commit_on_many_writes = 1
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 03af072..e418366 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -10,7 +10,7 @@
from frappe.utils import cstr, flt, getdate
from frappe import _
from frappe.model.mapper import get_mapped_doc
-from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty
+from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
from erpnext.controllers.buying_controller import BuyingController
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index 5a39763..610c7b8 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -140,7 +140,7 @@
self.recalculate_bin_qty(newdn)
def recalculate_bin_qty(self, newdn):
- from erpnext.utilities.repost_stock import repost_stock
+ from erpnext.stock.stock_balance import repost_stock
frappe.db.auto_commit_on_many_writes = 1
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
diff --git a/erpnext/utilities/repost_stock.py b/erpnext/stock/stock_balance.py
similarity index 100%
rename from erpnext/utilities/repost_stock.py
rename to erpnext/stock/stock_balance.py