From da17ceea73d736ad80e935963e9e5dd10bdd7ae6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 13 Jul 2018 12:03:49 +0530 Subject: [PATCH] patch fixes --- erpnext/patches.txt | 1 - .../patches/v7_0/repost_bin_qty_and_item_projected_qty.py | 2 +- erpnext/patches/v7_0/update_item_projected.py | 7 ------- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 erpnext/patches/v7_0/update_item_projected.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 3ddf6f9cca..2c7a289ee6 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -266,7 +266,6 @@ erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po erpnext.patches.v6_27.fix_recurring_order_status erpnext.patches.v6_20x.update_product_bundle_description erpnext.patches.v7_0.update_party_status #2016-09-22 -erpnext.patches.v7_0.update_item_projected erpnext.patches.v7_0.remove_features_setup erpnext.patches.v7_0.update_home_page execute:frappe.delete_doc_if_exists("Page", "financial-analytics") diff --git a/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py b/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py index 5d76304756..a5cf22cf01 100644 --- a/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py +++ b/erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py @@ -9,7 +9,7 @@ def execute(): def repost_bin_qty(): for bin in frappe.db.sql(""" select name from `tabBin` - where (actual_qty + ordered_qty + indented_qty + planned_qty- reserved_qty - reserved_qty_for_production) != projected_qty """, as_dict=1): + where (actual_qty + ordered_qty + indented_qty + planned_qty - reserved_qty - reserved_qty_for_production - reserved_qty_for_sub_contract) != projected_qty """, as_dict=1): bin_doc = frappe.get_doc('Bin', bin.name) bin_doc.set_projected_qty() bin_doc.db_set("projected_qty", bin_doc.projected_qty, update_modified = False) diff --git a/erpnext/patches/v7_0/update_item_projected.py b/erpnext/patches/v7_0/update_item_projected.py deleted file mode 100644 index 71b54af142..0000000000 --- a/erpnext/patches/v7_0/update_item_projected.py +++ /dev/null @@ -1,7 +0,0 @@ -import frappe - -def execute(): - frappe.reload_doctype("Item") - from erpnext.stock.doctype.bin.bin import update_item_projected_qty - for item in frappe.get_all("Item", filters={"is_stock_item": 1}): - update_item_projected_qty(item.name) \ No newline at end of file