On Windows 7 periode_id is getting as unicode, not str giving error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
On windows 7, Open ERP 6.1 When I go to Accounting > Bank and Cash > Journal Items it giving error
Client Traceback (most recent call last):
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
Server Traceback (most recent call last):
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
File "C:\Program Files\OpenERP 6.1-1\server\
DataError: invalid input syntax for integer: "08/2012"
You will have to change the function to detect the period id in unicode also,
Patch the addons/ account/ account_ move_line. py function
def convert_ to_period( self, cr, uid, context=None): get('account. period' ) get('period_ id', False):
period_ id = context. get('period_ id') obj.search( cr, uid, [('name', 'ilike', period_id)])
context. update( {
' period_ id': ids[0]
if context is None:
context = {}
period_obj = self.pool.
#check if the period_id changed in the context from client side
if context.
if type(period_id) == str:
ids = period_
})
return context
to support unicode period ids
def convert_ to_period( self, cr, uid, context=None): get('account. period' ) get('period_ id', False):
period_ id = context. get('period_ id') obj.search( cr, uid, [('name', 'ilike', period_id)])
context. update( {
' period_ id': ids[0]
if context is None:
context = {}
period_obj = self.pool.
#check if the period_id changed in the context from client side
if context.
if type(period_id) == str or type(period_id) == unicode:
ids = period_
})
return context