← Back to team overview

savoirfairelinux-openerp team mailing list archive

[Merge] lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245 into lp:openobject-addons/7.0

 

Sandy Carter (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245 into lp:openobject-addons/7.0.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1292245 in OpenERP Addons: "account_budget has UnicodeEncodeError when raising except_osv"
  https://bugs.launchpad.net/openobject-addons/+bug/1292245

For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245/+merge/210925

This fixes bug lp:1292245

Makes sure that the budget name is a unicode to avoid UnicodeEncodeError which happens when budget name contains UFT-8 characters.
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245/+merge/210925
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245.
=== modified file 'account_budget/account_budget.py'
--- account_budget/account_budget.py	2012-12-17 15:23:03 +0000
+++ account_budget/account_budget.py	2014-03-13 22:36:06 +0000
@@ -116,7 +116,7 @@
         for line in self.browse(cr, uid, ids, context=context):
             acc_ids = [x.id for x in line.general_budget_id.account_ids]
             if not acc_ids:
-                raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
+                raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % unicode(line.general_budget_id.name))
             date_to = line.date_to
             date_from = line.date_from
             if context.has_key('wizard_date_from'):


Follow ups