From 964dee9f18f6be0b2d58ae5391eedd20805f90d3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 26 Mar 2012 10:54:05 +0530 Subject: [PATCH] fix in stock reconciliation --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 +-- erpnext/stock/doctype/warehouse/warehouse.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 8ea8273e95..08ef1bcac9 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -59,8 +59,7 @@ class DocType: self.validate_item(s[0], count) self.validate_warehouse(s[1], count) - # encode as ascii - self.data.append([d.encode("ascii") for d in s]) + self.data.append(s) count += 1 if not self.validated: diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index 8b08fab098..f04f4eec4c 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -39,7 +39,8 @@ class DocType: self.doclist = doclist def get_bin(self, item_code): - bin = sql("select name from tabBin where item_code = '%s' and warehouse = '%s'" % (item_code, self.doc.name)) + bin = sql("select name from tabBin where item_code = %s and \ + warehouse = %s", (item_code, self.doc.name)) bin = bin and bin[0][0] or '' if not bin: if not self.doc.warehouse_type :