2012-04-02 05:44:18 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
##############################################################################
|
|
|
|
#
|
2012-04-10 09:56:42 +00:00
|
|
|
# OpenERP, Open Source Business Applications
|
|
|
|
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
|
2012-04-02 05:44:18 +00:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
2012-12-06 14:56:32 +00:00
|
|
|
from openerp.osv import fields, osv
|
2012-04-02 05:44:18 +00:00
|
|
|
|
2012-04-10 11:52:19 +00:00
|
|
|
class hr_config_settings(osv.osv_memory):
|
2012-04-10 10:56:32 +00:00
|
|
|
_name = 'hr.config.settings'
|
2012-04-02 05:44:18 +00:00
|
|
|
_inherit = 'res.config.settings'
|
2012-04-04 09:36:42 +00:00
|
|
|
|
2012-04-02 05:44:18 +00:00
|
|
|
_columns = {
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_timesheet_sheet': fields.boolean('Allow timesheets validation by managers',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_timesheet_sheet."""),
|
2012-10-26 08:01:37 +00:00
|
|
|
'module_hr_attendance': fields.boolean('Install attendances feature',
|
2012-04-27 10:43:59 +00:00
|
|
|
help ="""This installs the module hr_attendance."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_timesheet': fields.boolean('Manage timesheets',
|
2012-06-25 09:41:20 +00:00
|
|
|
help ="""This installs the module hr_timesheet."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_holidays': fields.boolean('Manage holidays, leaves and allocation requests',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_holidays."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_expense': fields.boolean('Manage employees expenses',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_expense."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_recruitment': fields.boolean('Manage the recruitment process',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_recruitment."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_contract': fields.boolean('Record contracts per employee',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_contract."""),
|
2013-04-16 13:48:47 +00:00
|
|
|
'module_hr_evaluation': fields.boolean('Organize employees periodic evaluation',
|
2012-04-10 11:52:19 +00:00
|
|
|
help ="""This installs the module hr_evaluation."""),
|
2013-04-16 13:48:47 +00:00
|
|
|
'module_hr_gamification': fields.boolean('Drive engagement with challenges and badges',
|
2013-03-13 10:33:34 +00:00
|
|
|
help ="""This installs the module hr_gamification."""),
|
2012-10-29 15:08:09 +00:00
|
|
|
'module_account_analytic_analysis': fields.boolean('Allow invoicing based on timesheets (the sale application will be installed)',
|
2012-10-26 08:33:52 +00:00
|
|
|
help ="""This installs the module account_analytic_analysis, which will install sales management too."""),
|
2012-09-12 07:14:13 +00:00
|
|
|
'module_hr_payroll': fields.boolean('Manage payroll',
|
2012-05-14 13:10:42 +00:00
|
|
|
help ="""This installs the module hr_payroll."""),
|
2012-04-10 11:52:19 +00:00
|
|
|
}
|
2012-04-02 05:44:18 +00:00
|
|
|
|
2012-06-05 05:10:31 +00:00
|
|
|
def onchange_hr_timesheet(self, cr, uid, ids, timesheet, context=None):
|
2012-06-25 09:41:20 +00:00
|
|
|
""" module_hr_timesheet implies module_hr_attendance """
|
2012-06-05 05:10:31 +00:00
|
|
|
if timesheet:
|
2012-06-25 09:41:20 +00:00
|
|
|
return {'value': {'module_hr_attendance': True}}
|
|
|
|
return {}
|
|
|
|
|
2012-06-05 05:10:31 +00:00
|
|
|
def onchange_hr_attendance(self, cr, uid, ids, attendance, context=None):
|
2012-06-25 09:41:20 +00:00
|
|
|
""" module_hr_timesheet implies module_hr_attendance """
|
|
|
|
if not attendance:
|
|
|
|
return {'value': {'module_hr_timesheet': False}}
|
|
|
|
return {}
|
|
|
|
|
2012-04-04 06:47:58 +00:00
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|