From 949b71a0c96f35e25deabfb95205d72e81cb3e08 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 27 Jan 2011 17:17:01 +0530 Subject: [PATCH] [FIX]stock :UnicodeEncodeError in stock_change_product_qty.py lp bug: https://launchpad.net/bugs/707809 fixed bzr revid: ron@tinyerp.com-20110127114701-yilw96l2f3bxnbh2 --- addons/stock/wizard/stock_change_product_qty.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py index c22ade231be..f93cd9b8dbc 100644 --- a/addons/stock/wizard/stock_change_product_qty.py +++ b/addons/stock/wizard/stock_change_product_qty.py @@ -21,6 +21,7 @@ from osv import fields, osv from tools.translate import _ +import tools class stock_change_product_qty(osv.osv_memory): _name = "stock.change.product.qty" @@ -84,7 +85,7 @@ class stock_change_product_qty(osv.osv_memory): res_original = prod_obj_pool.browse(cr, uid, rec_id, context=context) for data in self.browse(cr, uid, ids, context=context): - inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: ') + str(res_original.name)}, context=context) + inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: ') + tools.ustr(res_original.name)}, context=context) line_data ={ 'inventory_id' : inventory_id, 'product_qty' : data.new_quantity,