if ids2: vals['manager_id'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'),_('Either there is no Employee defined, or no User attached with it.')) self.write(cr, uid, ids, vals) self._create_holiday(cr, uid, ids)
return True
This code is from the official release, openerp server 5.0.9. the bug is still on it. how to fix it?
def holidays_ validate( self, cr, uid, ids, *args):
self.check_ holidays( cr,uid, ids)
'state' :'validate' , get('hr. employee' ).search( cr, uid, [('user_id','=', uid)])
vals = {
}
ids2 = self.pool.
if ids2:
vals[ 'manager_ id'] = ids2[0] osv(_(' Warning !'),_('Either there is no Employee defined, or no User attached with it.'))
self.write( cr, uid, ids, vals)
self._ create_ holiday( cr, uid, ids)
else:
raise osv.except_
return True
This code is from the official release, openerp server 5.0.9. the bug is still on it. how to fix it?