1
# -*- coding: utf-8 -*-
2
##############################################################################
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as
8
# published by the Free Software Foundation, either version 3 of the
9
# License, or (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
##############################################################################
21
from osv import fields, osv
22
import reis_base as util
25
class hr_employee(osv.osv):
26
_inherit = 'hr.employee'
28
'code': fields.char('Internal code', size=16),
31
def name_get(self, cr, uid, ids, context=None):
32
return util.ext_name_get(self, cr, uid, ids, '[%(code)s] %(name)s', ['code','name'], context=context)
34
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
35
return util.ext_name_search(self, cr, user, name, args, operator, context=context, limit=limit,
39
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: