~jgrandguillaume-c2c/openobject-addons/multi-company-cost-price

« back to all changes in this revision

Viewing changes to hr_recruitment/hr_recruitment.py

  • Committer: Joël Grand-Guillaume
  • Date: 2010-04-08 09:00:10 UTC
  • mfrom: (2533.3.664)
  • Revision ID: joel.grandguillaume@camptocamp.com-20100408090010-c0pqjan341s18bxs
[MRG] Merge from last trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    OpenERP, Open Source Management Solution
 
5
#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
 
6
#
 
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.
 
11
#
 
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.
 
16
#
 
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/>.
 
19
#
 
20
##############################################################################
 
21
 
 
22
from osv import fields,osv,orm
 
23
 
 
24
AVAILABLE_STATES = [
 
25
    ('draft','New'),
 
26
    ('open','In Progress'),
 
27
    ('cancel', 'Refused'),
 
28
    ('done', 'Hired'),
 
29
    ('pending','Pending')
 
30
]
 
31
 
 
32
AVAILABLE_PRIORITIES = [
 
33
    ('5','Not Good'),
 
34
    ('4','On Average'),
 
35
    ('3','Good'),
 
36
    ('2','Very Good'),
 
37
    ('1','Excellent')
 
38
]
 
39
 
 
40
 
 
41
class hr_applicant(osv.osv):
 
42
    _name = "hr.applicant"
 
43
    _description = "Applicant Cases"
 
44
    _order = "id desc"
 
45
    _inherit ='crm.case'
 
46
    _columns = {
 
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"),
 
63
    }
 
64
hr_applicant()
 
65
 
 
66
class hr_job(osv.osv):
 
67
    _inherit = "hr.job"
 
68
    _name = "hr.job"
 
69
    _columns = {
 
70
        'survey_id': fields.many2one('survey', 'Survey'),
 
71
    }
 
72
 
 
73
hr_job()
 
 
b'\\ No newline at end of file'