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):
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
to support unicode period ids
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 or type(period_id) == unicode:
ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)]) context.update({ 'period_id': ids[0]
})
return context
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