Merge lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245-trunk into lp:openobject-addons

Status: Needs review
Proposed branch: lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245-trunk
Merge into: lp:openobject-addons
Diff against target: 20 lines (+2/-1)
1 file modified
account_budget/account_budget.py (+2/-1)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openobject-addons/crossovered_unicode_1292245-trunk
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+210929@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
9213. By Sandy Carter (http://www.savoirfairelinux.com)

[FIX] Assures budget name is taken as unicode instead of str

Unmerged revisions

9213. By Sandy Carter (http://www.savoirfairelinux.com)

[FIX] Assures budget name is taken as unicode instead of str

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_budget/account_budget.py'
--- account_budget/account_budget.py 2013-10-27 12:31:04 +0000
+++ account_budget/account_budget.py 2014-03-18 13:55:32 +0000
@@ -22,6 +22,7 @@
22import datetime22import datetime
2323
24from openerp.osv import fields, osv24from openerp.osv import fields, osv
25from openerp.tools import ustr
25from openerp.tools.translate import _26from openerp.tools.translate import _
2627
27import openerp.addons.decimal_precision as dp28import openerp.addons.decimal_precision as dp
@@ -114,7 +115,7 @@
114 for line in self.browse(cr, uid, ids, context=context):115 for line in self.browse(cr, uid, ids, context=context):
115 acc_ids = [x.id for x in line.general_budget_id.account_ids]116 acc_ids = [x.id for x in line.general_budget_id.account_ids]
116 if not acc_ids:117 if not acc_ids:
117 raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))118 raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
118 date_to = line.date_to119 date_to = line.date_to
119 date_from = line.date_from120 date_from = line.date_from
120 if context.has_key('wizard_date_from'):121 if context.has_key('wizard_date_from'):

Subscribers

People subscribed via source and target branches

to all changes: