openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #14535
[Bug 1037923] Re: unicode problem on account module
*** This bug is a duplicate of bug 943359 ***
https://bugs.launchpad.net/bugs/943359
** This bug has been marked a duplicate of bug 943359
Error on view journal items
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1037923
Title:
unicode problem on account module
Status in OpenERP Addons (modules):
New
Bug description:
I have account period with unicode such as "5-р сар.2012".
But convert_to_period method on account.move.line does not support
unicode data. This is bug.
def convert_to_period(self, cr, uid, context=None):
if context is None:
context = {}
period_obj = self.pool.get('account.period')
#check if the period_id changed in the context from client side
if context.get('period_id', False):
period_id = context.get('period_id')
if type(period_id) == str:
ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
context.update({
'period_id': ids[0]
})
return context
If i search period and journal on journal item display then getting
errors.
File "/openerp/addons/account/account_move_line.py", line 958, in view_header_get
cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
File "/openerp/sql_db.py", line 152, in wrapper
return f(self, *args, **kwargs)
File "/openerp/sql_db.py", line 212, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "5-р сар.2012"
LINE 1: SELECT code FROM account_period WHERE id = '5-р сар.2012'
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1037923/+subscriptions
References