feat: Material Request and Stock Entry Enhancement (#22671)

* feat: send to warehouse

* adding warehouse validation

* fix: review changes

* fix: review changes

* stock entry enhancement

* fix: review changes
This commit is contained in:
Anupam Kumar
2020-08-12 17:55:02 +05:30
committed by GitHub
parent e0cc421e50
commit 674d1b0803
14 changed files with 177 additions and 140 deletions

View File

@@ -19,7 +19,7 @@ def create_stock_entry_types():
for purpose in ["Material Issue", "Material Receipt", "Material Transfer",
"Material Transfer for Manufacture", "Material Consumption for Manufacture", "Manufacture",
"Repack", "Send to Subcontractor", "Send to Warehouse", "Receive at Warehouse"]:
"Repack", "Send to Subcontractor"]:
ste_type = frappe.get_doc({
'doctype': 'Stock Entry Type',

View File

@@ -0,0 +1,27 @@
# Copyright(c) 2020, Frappe Technologies Pvt.Ltd.and Contributors
# License: GNU General Public License v3.See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("stock", "doctype", "stock_entry")
if frappe.db.has_column("Stock Entry", "add_to_transit"):
frappe.db.sql("""
UPDATE `tabStock Entry` SET
stock_entry_type = 'Material Transfer',
purpose = 'Material Transfer',
add_to_transit = 1 WHERE stock_entry_type = 'Send to Warehouse'
""")
frappe.db.sql("""UPDATE `tabStock Entry` SET
stock_entry_type = 'Material Transfer',
purpose = 'Material Transfer'
WHERE stock_entry_type = 'Receive at Warehouse'
""")
frappe.reload_doc("stock", "doctype", "warehouse_type")
if not frappe.db.exists('Warehouse Type', 'Transit'):
doc = frappe.new_doc('Warehouse Type')
doc.name = 'Transit'
doc.insert()