1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Affero General Public License as
9
# published by the Free Software Foundation, either version 3 of the
10
# License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Affero General Public License for more details.
17
# You should have received a copy of the GNU Affero General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
##############################################################################
22
from osv import fields,osv,orm
26
('open','In Progress'),
27
('cancel', 'Refused'),
32
AVAILABLE_PRIORITIES = [
41
class hr_applicant(osv.osv):
42
_name = "hr.applicant"
43
_description = "Applicant Cases"
47
'date_closed': fields.datetime('Closed', readonly=True),
48
'date': fields.datetime('Date'),
49
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Appreciation'),
50
'job_id': fields.many2one('hr.job', 'Applied Job'),
51
'salary_proposed': fields.float('Proposed Salary'),
52
'salary_expected': fields.float('Expected Salary'),
53
'availability': fields.integer('Availability (Days)'),
54
'partner_name': fields.char("Applicant's Name", size=64),
55
'partner_phone': fields.char('Phone', size=32),
56
'partner_mobile': fields.char('Mobile', size=32),
57
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]"),
58
'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]"),
59
'department_id':fields.many2one('hr.department','Department'),
60
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
61
'survey' : fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
62
'response' : fields.integer("Response"),
66
class hr_job(osv.osv):
70
'survey_id': fields.many2one('survey', 'Survey'),
b'\\ No newline at end of file'