From 0cf7f7aee038a9beeda2bbe0de0aa6a5e15830e6 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 1 Nov 2016 16:19:33 +0530 Subject: [PATCH] [fix] set default value as empty frappe dict --- erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a60e945934..1a3c26c2b2 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -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