json error fixed in stock entry

This commit is contained in:
Nabin Hait 2012-05-15 15:29:47 +05:30
parent 901e92d8fa
commit f044526b92

View File

@ -49,7 +49,8 @@ class DocType(TransactionBase):
# get item details
# ----------------
def get_item_details(self, arg):
arg, actual_qty, in_rate = eval(arg), 0, 0
import json
arg, actual_qty, in_rate = json.loads(arg), 0, 0
item = sql("select stock_uom, description, item_name from `tabItem` where name = %s and (ifnull(end_of_life,'')='' or end_of_life ='0000-00-00' or end_of_life > now())", (arg.get('item_code')), as_dict = 1)
if not item: