[MERGE]
[odoo/odoo.git] / addons / hr_recruitment / wizard / hr_recruitment_employee_hired.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6 #    $Id$
7 #
8 #    This program is free software: you can redistribute it and/or modify
9 #    it under the terms of the GNU Affero General Public License as published by
10 #    the Free Software Foundation, either version 3 of the License, or
11 #    (at your option) any later version.
12 #
13 #    This program is distributed in the hope that it will be useful,
14 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #    GNU Affero General Public License for more details.
17 #
18 #    You should have received a copy of the GNU Affero General Public License
19 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 #
21 ##############################################################################
22 from osv import osv, fields
23 from tools.translate import _
24
25 class hired_employee(osv.osv_memory):
26     _name = 'hired.employee'
27     _description = 'Create Employee'
28
29     def case_close(self, cr, uid,ids, context=None):
30         """
31         @param self: The object pointer
32         @param cr: the current row, from the database cursor,
33         @param uid: the current user’s ID for security checks,
34         @param ids: List of case's Ids
35         @param *args: Give Tuple Value
36         """
37         if context is None:
38             context = {}
39         self.pool.get('hr.applicant').case_close(cr, uid,context.get('active_ids',[]))
40         return {}
41
42     def case_close_with_emp(self, cr, uid,ids, context=None):
43         """
44         @param self: The object pointer
45         @param cr: the current row, from the database cursor,
46         @param uid: the current user’s ID for security checks,
47         @param ids: List of case's Ids
48         """
49         if context is None:
50             context = {}
51         return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
52
53 hired_employee()
54
55 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: