Don't set default for warehouse when creating serial no

This commit is contained in:
Anand Doshi 2014-06-18 12:48:46 +05:30
parent 14920b447c
commit e3ac8dd5a8

View File

@ -278,13 +278,16 @@ def get_serial_nos(serial_no):
def make_serial_no(serial_no, sle):
sr = frappe.new_doc("Serial No")
sr.warehouse = None
sr.dont_update_if_missing.append("warehouse")
sr.ignore_permissions = True
sr.serial_no = serial_no
sr.item_code = sle.item_code
sr.warehouse = None
sr.company = sle.company
sr.via_stock_ledger = True
sr.insert()
sr.warehouse = sle.warehouse
sr.status = "Available"
sr.save()