Jagdish Panchal (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-v62_hr_config-jap into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_hr_config-jap/+merge/100925
Hello,
[ADD]: Added new configuration wizard for HR application.
Thanks,
JAP
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_hr_config-jap/+merge/100925
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-v62_hr_config-jap into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
=== modified file 'hr/__init__.py'
--- hr/__init__.py 2011-10-11 20:05:49 +0000
+++ hr/__init__.py 2012-04-05 07:35:42 +0000
@@ -24,5 +24,6 @@
import report
import wizard
+import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'hr/__openerp__.py'
--- hr/__openerp__.py 2012-02-13 15:27:55 +0000
+++ hr/__openerp__.py 2012-04-05 07:35:42 +0000
@@ -50,6 +50,7 @@
'hr_installer.xml',
'hr_data.xml',
'hr_board.xml',
+ 'res_config_view.xml',
],
'demo_xml': [
'hr_demo.xml',
=== added file 'hr/res_config.py'
--- hr/res_config.py 1970-01-01 00:00:00 +0000
+++ hr/res_config.py 2012-04-05 07:35:42 +0000
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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/>.
+#
+##############################################################################
+
+from osv import fields, osv
+from lxml import etree
+
+class human_resources_configuration(osv.osv_memory):
+ _name = 'human.resources.configuration'
+ _inherit = 'res.config.settings'
+
+ _columns = {
+ 'module_hr_timesheet_sheet': fields.boolean('Manage Timesheet and Attendances',
+ help ="""It installs the hr_timesheet_sheet module."""),
+ 'module_hr_holidays': fields.boolean('Manage Holidays',
+ help ="""It installs the hr_holidays module."""),
+ 'module_hr_expense': fields.boolean('Manage Employees Expenses',
+ help ="""It installs the hr_expense module."""),
+ 'module_hr_recruitment': fields.boolean('Manage Recruitment Process',
+ help ="""It installs the hr_payroll module."""),
+ 'module_hr_contract': fields.boolean('Manage Employees Contracts',
+ help ="""It installs the hr_contract module."""),
+ 'module_hr_evaluation': fields.boolean('Manage Appraisals Process',
+ help ="""It installs the hr_evaluation module."""),
+ }
+
+human_resources_configuration()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'hr/res_config_view.xml'
--- hr/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ hr/res_config_view.xml 2012-04-05 07:35:42 +0000
@@ -0,0 +1,52 @@
+<openerp>
+ <data>
+
+ <record id="open_payroll1_modules" model="ir.actions.act_window">
+ <field name="name">Payroll</field>
+ <field name="res_model">ir.module.module</field>
+ <field name="view_mode">kanban,tree,form</field>
+ <field name="domain">[('shortdesc','ilike','Payroll'),('state','=','uninstalled'),('name','!=','hr_payroll_account')]</field>
+ </record>
+
+ <record id="view_human_resources_configuration" model="ir.ui.view">
+ <field name="name">Human Resources Application</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string ="HR Application">
+ <separator string="Human Resources" colspan="4"/>
+ <group colspan="4" col="4">
+ <label string="Create Your Departments :" />
+ <button name="%(view_department_form_installer)d" string="Departments" type="action" icon="terp-personal+"/>
+ <label string="Create Your Employees :" />
+ <button name="%(open_view_employee_list_my)d" string="Employees" type="action" icon="terp-personal"/>
+ <field name="module_hr_timesheet_sheet"/>
+ <field name="module_hr_holidays"/>
+ <label string="Configure Your Salary Rules :"/>
+ <button string="Salary Rules" icon="gtk-go-forward" name="%(open_payroll1_modules)d" type="action" />
+ </group>
+ <separator string="Additional Features" colspan="4"/>
+ <group name="additional features" colspan="4" col="4">
+ <field name="module_hr_expense"/>
+ <field name="module_hr_recruitment"/>
+ <field name="module_hr_evaluation"/>
+ <field name="module_hr_contract"/>
+ </group>
+
+ </form>
+ </field>
+ </record>
+
+ <record id="action_human_resources_configuration" model="ir.actions.act_window">
+ <field name="name">Configure Human Resources Application</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">human.resources.configuration</field>
+ <field name="view_id" ref="view_human_resources_configuration"/>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ </record>
+
+ <menuitem id="menu_human_resources_configuration" name="Human Resources" parent="base.menu_config" sequence="8" action="action_human_resources_configuration"/>
+
+ </data>
+</openerp>
=== modified file 'hr_evaluation/hr_evaluation_installer.xml'
--- hr_evaluation/hr_evaluation_installer.xml 2011-12-19 16:54:40 +0000
+++ hr_evaluation/hr_evaluation_installer.xml 2012-04-05 07:35:42 +0000
@@ -14,5 +14,23 @@
<field name="action_id" ref="action_evaluation_plans_installer" />
<field name="category_id" ref="hr.category_hr_management_config" />
</record>
+
+ <!-- Hr Configuration wizard -->
+
+ <record id="view_evaluation_config_wizard_inherit" model="ir.ui.view">
+ <field name="name">human.evaluation.resources.configuration.form.inherit</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <field name="module_hr_evaluation" position="after">
+ <group colspan="2" col="2">
+ <label string="Create Appraisal Plans : " />
+ <button name="%(action_evaluation_plans_installer)d" string="Appraisal Plans" type="action" icon="terp-stock_align_left_24"/>
+ </group>
+ </field>
+ </field>
+ </record>
+
</data>
</openerp>
=== modified file 'hr_expense/hr_expense_installer_view.xml'
--- hr_expense/hr_expense_installer_view.xml 2011-10-16 01:28:00 +0000
+++ hr_expense/hr_expense_installer_view.xml 2012-04-05 07:35:42 +0000
@@ -32,5 +32,23 @@
<field name="category_id" ref="hr.category_hr_management_config"/>
<field name="sequence">3</field>
</record>
+
+ <!-- Hr Configuration wizard -->
+
+ <record id="view_expenseconfig_wizard_inherit" model="ir.ui.view">
+ <field name="name">human.expense.resources.configuration.form.inherit</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <field name="module_hr_expense" position="after">
+ <group colspan="2" col="2">
+ <label string="Create Expenses Products :" />
+ <button name="%(product_normal_form_view_installer)d" string="Expenses Products" type="action" icon="terp-accessories-archiver"/>
+ </group>
+ </field>
+ </field>
+ </record>
+
</data>
</openerp>
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2012-03-27 08:45:35 +0000
+++ hr_holidays/hr_holidays_view.xml 2012-04-05 07:35:42 +0000
@@ -489,6 +489,22 @@
<field name="category_id" ref="hr.category_hr_management_config"/>
</record>
+ <!-- Hr Configuration wizard -->
+
+ <record id="view_config_wizard_inherit" model="ir.ui.view">
+ <field name="name">human.resources.configuration.form.inherit</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <field name="module_hr_holidays" position="after">
+ <label string="Allocate Leaves :" />
+ <button name="%(hr_holidays.hr_holidays_leaves_assign_legal)d" string="Allocate Leaves" type="action" icon="gtk-apply"/>
+ </field>
+ </field>
+ </record>
+
+
<!-- Hr employee inherit Legal Leaves -->
<record id="view_employee_form_leave_inherit" model="ir.ui.view">
=== modified file 'hr_payroll/__init__.py'
--- hr_payroll/__init__.py 2011-01-14 00:11:01 +0000
+++ hr_payroll/__init__.py 2012-04-05 07:35:42 +0000
@@ -24,4 +24,6 @@
import report
import wizard
+import res_config
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'hr_payroll/__openerp__.py'
--- hr_payroll/__openerp__.py 2012-02-13 15:27:55 +0000
+++ hr_payroll/__openerp__.py 2012-04-05 07:35:42 +0000
@@ -59,6 +59,7 @@
'hr_payroll_data.xml',
'security/ir.model.access.csv',
'wizard/hr_payroll_contribution_register_report.xml',
+ 'res_config_view.xml',
],
'test': [
'test/payslip.yml',
=== added file 'hr_payroll/res_config.py'
--- hr_payroll/res_config.py 1970-01-01 00:00:00 +0000
+++ hr_payroll/res_config.py 2012-04-05 07:35:42 +0000
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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/>.
+#
+##############################################################################
+
+from osv import osv, fields
+
+class human_resources_configuration(osv.osv_memory):
+ _inherit = 'human.resources.configuration'
+ _columns = {
+ 'module_hr_payroll_account': fields.boolean('Manage Account Payroll',
+ help ="""It installs the hr_payroll_account module."""),
+ }
=== added file 'hr_payroll/res_config_view.xml'
--- hr_payroll/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ hr_payroll/res_config_view.xml 2012-04-05 07:35:42 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_hr_config_inherit" model="ir.ui.view">
+ <field name="name">Account Payroll Application</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='additional features']" position="after">
+ <group name="Account Payroll" colspan="4" col="4">
+ <separator string="Account Payroll" colspan="4"/>
+ <field name="module_hr_payroll_account"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
=== modified file 'hr_recruitment/__init__.py'
--- hr_recruitment/__init__.py 2011-01-14 00:11:01 +0000
+++ hr_recruitment/__init__.py 2012-04-05 07:35:42 +0000
@@ -22,5 +22,6 @@
import hr_recruitment
import report
import wizard
+import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'hr_recruitment/__openerp__.py'
--- hr_recruitment/__openerp__.py 2012-02-13 15:27:55 +0000
+++ hr_recruitment/__openerp__.py 2012-04-05 07:35:42 +0000
@@ -49,7 +49,8 @@
'security/ir.model.access.csv',
'report/hr_recruitment_report_view.xml',
'board_hr_recruitment_statistical_view.xml',
- 'hr_recruitment_installer_view.xml'
+ 'hr_recruitment_installer_view.xml',
+ 'res_config_view.xml',
],
'init_xml': [
'hr_recruitment_data.xml'
=== modified file 'hr_recruitment/hr_recruitment_installer_view.xml'
--- hr_recruitment/hr_recruitment_installer_view.xml 2011-10-16 01:28:00 +0000
+++ hr_recruitment/hr_recruitment_installer_view.xml 2012-04-05 07:35:42 +0000
@@ -15,5 +15,6 @@
<field name="category_id" ref="hr.category_hr_management_config"/>
<field name="sequence">3</field>
</record>
+
</data>
</openerp>
=== added file 'hr_recruitment/res_config.py'
--- hr_recruitment/res_config.py 1970-01-01 00:00:00 +0000
+++ hr_recruitment/res_config.py 2012-04-05 07:35:42 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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/>.
+#
+##############################################################################
+
+from osv import osv, fields
+
+class hr_applicant_settings(osv.osv_memory):
+ _name = 'human.resources.configuration'
+ _inherit = ['human.resources.configuration', 'fetchmail.config.settings']
+
+ _columns = {
+ 'fetchmail_applicants': fields.boolean('Create Applicants from an email account',
+ fetchmail_model='hr.applicant', fetchmail_name='Incoming Application',
+ help ="""It allow to create applicant from an email account."""),
+
+ 'applicants_server': fields.char('Server', size=256),
+ 'applicants_port': fields.integer('Port'),
+ 'applicants_type': fields.selection([
+ ('pop', 'POP Server'),
+ ('imap', 'IMAP Server'),
+ ('local', 'Local Server'),
+ ], 'Type'),
+ 'applicants_is_ssl': fields.boolean('SSL/TLS',
+ help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
+ 'applicants_user': fields.char('Username', size=256),
+ 'applicants_password': fields.char('Password', size=1024),
+
+ }
+
+ _defaults = {
+ 'applicants_type': 'pop',
+ }
+
=== added file 'hr_recruitment/res_config_view.xml'
--- hr_recruitment/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ hr_recruitment/res_config_view.xml 2012-04-05 07:35:42 +0000
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_hr_apll_config_settings" model="ir.ui.view">
+ <field name="name">Human Resources Application</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='module_hr_recruitment']" position="after">
+ <group colspan="2" col="2">
+ <label string="Create Recruitment Stages :" />
+ <button name="%(hr_recruitment_stage_form_installer)d" string="Recruitment Stages" type="action" icon="terp-stage"/>
+ </group>
+ </xpath>
+ <xpath expr="//field[@name='module_hr_contract']" position="after">
+ <group name="Recruitment" colspan="4" col="4" >
+ <separator string="Recruitment" colspan="4"/>
+ <field name="fetchmail_applicants" />
+ <group attrs="{'invisible': [('fetchmail_applicants','=',False)]}">
+ <field name="applicants_server"/>
+ <field name="applicants_type" on_change="onchange_fetchmail('applicants', applicants_type, applicants_is_ssl)"/>
+ <field name="applicants_port"/>
+ <field name="applicants_is_ssl" on_change="onchange_fetchmail('applicants', applicants_type, applicants_is_ssl)"/>
+ <field name="applicants_user"/>
+ <field name="applicants_password" password="True"/>
+ </group>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
=== modified file 'hr_timesheet_sheet/__init__.py'
--- hr_timesheet_sheet/__init__.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet_sheet/__init__.py 2012-04-05 07:35:42 +0000
@@ -22,5 +22,6 @@
import hr_timesheet_sheet
import wizard
import report
+import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'hr_timesheet_sheet/__openerp__.py'
--- hr_timesheet_sheet/__openerp__.py 2012-02-13 15:27:55 +0000
+++ hr_timesheet_sheet/__openerp__.py 2012-04-05 07:35:42 +0000
@@ -61,7 +61,8 @@
'report/hr_timesheet_report_view.xml',
'report/timesheet_report_view.xml',
'wizard/hr_timesheet_current_view.xml',
- 'hr_timesheet_sheet_data.xml'
+ 'hr_timesheet_sheet_data.xml',
+ 'res_config_view.xml',
],
'demo_xml': ['hr_timesheet_sheet_demo.xml',
=== added file 'hr_timesheet_sheet/res_config.py'
--- hr_timesheet_sheet/res_config.py 1970-01-01 00:00:00 +0000
+++ hr_timesheet_sheet/res_config.py 2012-04-05 07:35:42 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# 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/>.
+#
+##############################################################################
+
+from osv import osv, fields
+import pooler
+class hr_timeshee_settings(osv.osv_memory):
+ _name = 'human.resources.configuration'
+ _inherit = 'human.resources.configuration'
+
+ _columns = {
+ 'timesheet_range': fields.selection(
+ [('day','Day'),('week','Week'),('month','Month')], 'Timesheet range',
+ help="Periodicity on which you validate your timesheets."),
+ 'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
+ help="Allowed difference in hours between the sign in/out and the timesheet " \
+ "computation for one sheet. Set this to 0 if you do not want any control."),
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ res = super(hr_timeshee_settings, self).default_get(cr, uid, fields, context)
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ res['timesheet_range']=user.company_id.timesheet_range
+ res['timesheet_max_difference']=user.company_id.timesheet_max_difference
+ return res
+
+ def set_timesheet_defaults(self, cr, uid, ids, context=None):
+ wizard = self.browse(cr, uid, ids)[0]
+ tm_range = wizard.timesheet_range
+ tm_diff = wizard.timesheet_max_difference
+ user = self.pool.get('res.users').browse(cr, uid, uid, context)
+ user.company_id.write({'timesheet_range': tm_range,'timesheet_max_difference': tm_diff})
+ return {}
=== added file 'hr_timesheet_sheet/res_config_view.xml'
--- hr_timesheet_sheet/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ hr_timesheet_sheet/res_config_view.xml 2012-04-05 07:35:42 +0000
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_hr_timehseet_config_settings" model="ir.ui.view">
+ <field name="name">Human Resources Application</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='module_hr_timesheet_sheet']" position="after">
+ <label string="Create Your Timesheet Accounts :"/>
+ <button name="%(hr_timesheet.action_define_analytic_structure)d" string="Timesheet Accounts" type="action" icon="terp-folder-green"/>
+ </xpath>
+ <xpath expr="//field[@name='module_hr_contract']" position="after">
+ <newline/>
+ <group name="Timesheets" colspan="4" col="8">
+ <separator string="Timesheets" colspan="12"/>
+ <field name="timesheet_range"/>
+ <field name="timesheet_max_difference"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp