[fix] set default value as empty frappe dict

This commit is contained in:
Saurabh 2016-11-01 16:19:33 +05:30
parent 4dd76f21c9
commit 0cf7f7aee0

View File

@ -31,7 +31,7 @@ class StockEntry(StockController):
item.update(get_bin_details(item.item_code, item.s_warehouse))
def validate(self):
self.pro_doc = None
self.pro_doc = frappe._dict()
if self.production_order:
self.pro_doc = frappe.get_doc('Production Order', self.production_order)
@ -582,7 +582,7 @@ class StockEntry(StockController):
def set_production_order_details(self):
if not getattr(self, "pro_doc", None):
self.pro_doc = None
self.pro_doc = frappe._dict()
if self.production_order:
# common validations