1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Business Applications
5 # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
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 openerp.osv import fields, osv
24 class hr_config_settings(osv.osv_memory):
25 _name = 'hr.config.settings'
26 _inherit = 'res.config.settings'
29 'module_hr_timesheet_sheet': fields.boolean('Allow timesheets validation by managers',
30 help ="""This installs the module hr_timesheet_sheet."""),
31 'module_hr_attendance': fields.boolean('Install attendances feature',
32 help ="""This installs the module hr_attendance."""),
33 'module_hr_timesheet': fields.boolean('Manage timesheets',
34 help ="""This installs the module hr_timesheet."""),
35 'module_hr_holidays': fields.boolean('Manage holidays, leaves and allocation requests',
36 help ="""This installs the module hr_holidays."""),
37 'module_hr_expense': fields.boolean('Manage employees expenses',
38 help ="""This installs the module hr_expense."""),
39 'module_hr_recruitment': fields.boolean('Manage the recruitment process',
40 help ="""This installs the module hr_recruitment."""),
41 'module_hr_contract': fields.boolean('Record contracts per employee',
42 help ="""This installs the module hr_contract."""),
43 'module_hr_evaluation': fields.boolean('Organize employees periodic evaluation',
44 help ="""This installs the module hr_evaluation."""),
45 'module_hr_gamification': fields.boolean('Drive engagement with challenges and badges',
46 help ="""This installs the module hr_gamification."""),
47 'module_account_analytic_analysis': fields.boolean('Allow invoicing based on timesheets (the sale application will be installed)',
48 help ="""This installs the module account_analytic_analysis, which will install sales management too."""),
49 'module_hr_payroll': fields.boolean('Manage payroll',
50 help ="""This installs the module hr_payroll."""),
53 def onchange_hr_timesheet(self, cr, uid, ids, timesheet, context=None):
54 """ module_hr_timesheet implies module_hr_attendance """
56 return {'value': {'module_hr_attendance': True}}
59 def onchange_hr_attendance(self, cr, uid, ids, attendance, context=None):
60 """ module_hr_timesheet implies module_hr_attendance """
62 return {'value': {'module_hr_timesheet': False}}
65 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: