[FIX]stock :UnicodeEncodeError in stock_change_product_qty.py

lp bug: https://launchpad.net/bugs/707809 fixed

bzr revid: ron@tinyerp.com-20110127114701-yilw96l2f3bxnbh2
This commit is contained in:
ron@tinyerp.com 2011-01-27 17:17:01 +05:30
parent 3925c26765
commit 949b71a0c9
1 changed files with 2 additions and 1 deletions

View File

@ -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,