account_budget has UnicodeEncodeError when raising except_osv
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
OpenERP Publisher's Warranty Team | |||
OpenERP Community Backports (Addons) | Status tracked in 7.0 | |||||
7.0 |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Invoice budget's warning when crossovered budget lines are not related to any account will cause a UnicodeEncodeError if the account has unicode-only characters such as é.
How to reproduce:
* Fresh database, install account_budget without demo.
* Under menu (Invoicing|
** Create a new budget, name it what you want, add the dates and code you want.
** Add a budget line, choose whatever dates you want and add a new budgetary position by clicking Create and Edit.
*** In the Budgetary Position form, put whatever code you want, but Give it a name with a utf character such as "Testé".
*** Do not add an account to the budgetary position.
*** Save the budgetary position
** Save and close the budgetary line
* Save the Budget form
Expected output:
OpenERP outputs a Warning (except_osv) which reads:
Error!
The Budget 'Testé' has no accounts!
Actual output:
OpenERP outputs an error message with the following output
Server Traceback (most recent call last):
File "web/addons/
return openerp.
File "openerp/
result = ExportService.
File "openerp/
res = fn(db, uid, *params)
File "openerp/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "openerp/
return f(self, dbname, *args, **kwargs)
File "openerp/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "openerp/
return getattr(object, method)(cr, uid, *args, **kw)
File "server/
result = self._read_flat(cr, user, select, fields, context, load)
File "openerp/
res2 = self._columns[
File "openerp/
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "account_
res[line.id] = self._prac_amt(cr, uid, [line.id], context=
File "account_
raise osv.except_
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)
Version 7.0
addons: r9900
server: r5259
web: 4159
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 20 lines (+2/-1)1 file modifiedaccount_budget/account_budget.py (+2/-1)
- Raphaël Valyi - http://www.akretion.com: Approve
- Holger Brunn (Therp): Approve (code review)
- Pedro Manuel Baeza: Approve (code review)
-
Diff: 20 lines (+2/-1)1 file modifiedaccount_budget/account_budget.py (+2/-1)
- OpenERP Core Team: Pending requested
-
Diff: 20 lines (+2/-1)1 file modifiedaccount_budget/account_budget.py (+2/-1)
tags: | added: maintenance |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |