diff options
| author | Thibault Delavallée <tde@openerp.com> | 2015-06-09 12:52:03 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-06-09 12:52:03 +0200 |
| commit | b865005fca31d543e551a8d8ed9f82d36ace8db6 (patch) | |
| tree | 5d8432b17ce3c0b5dc91b2cfb394788f49e21e76 /addons/hr | |
| parent | 3675317594cecfcd1c2af5687f4989239630e091 (diff) | |
Revert "[IMP] HR Usability cleaning"
This reverts commit 79c338dcb352be3d40118f998a76e1b7576a35da.
This commit has been done hastily without review. Moreover it
mixes changes related to different stuff.
The commit is then reverted to allow a propre review and cleaning
of the branch.
Diffstat (limited to 'addons/hr')
| -rw-r--r-- | addons/hr/hr.py | 1 | ||||
| -rw-r--r-- | addons/hr/hr_view.xml | 35 | ||||
| -rw-r--r-- | addons/hr/res_config.py | 4 | ||||
| -rw-r--r-- | addons/hr/res_config_view.xml | 123 | ||||
| -rw-r--r-- | addons/hr/security/hr_security.xml | 5 |
5 files changed, 151 insertions, 17 deletions
diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 62ce66995ec..d1a85a17005 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -165,6 +165,7 @@ class hr_employee(osv.osv): 'ssnid': fields.char('SSN No', help='Social Security Number'), 'sinid': fields.char('SIN No', help="Social Insurance Number"), 'identification_id': fields.char('Identification No'), + 'otherid': fields.char('Other Id'), 'gender': fields.selection([('male', 'Male'), ('female', 'Female'), ('other', 'Other')], 'Gender'), 'marital': fields.selection([('single', 'Single'), ('married', 'Married'), ('widower', 'Widower'), ('divorced', 'Divorced')], 'Marital Status'), 'department_id': fields.many2one('hr.department', 'Department'), diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 8b1bfe480c3..be7dfecdfdf 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -29,12 +29,12 @@ <h1> <field name="name"/> </h1> + <label for="category_ids" class="oe_edit_only" groups="base.group_hr_user"/> + <field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time" groups="base.group_hr_user"/> <label for="work_email" class="oe_edit_only"/> <field name="work_email" widget="email"/> <label for="work_phone" class="oe_edit_only"/> <field name="work_phone"/> - <label for="category_ids" class="oe_edit_only" groups="base.group_hr_user"/> - <field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time" groups="base.group_hr_user"/> </div> <div class="oe_right oe_button_box" name="button_box"> <!-- Put here related buttons --> @@ -50,11 +50,16 @@ <field name="work_location"/> </group> <group string="Position"> - <field name="department_id" on_change="onchange_department_id(department_id)"/> + <field name="department_id" groups="hr.group_multi_departments" on_change="onchange_department_id(department_id)"/> <field name="job_id"/> <field name="parent_id"/> <field name="coach_id"/> </group> + <group> + <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/> + <field name="user_id" on_change="onchange_user(user_id)" string="Related User" + context="{'default_groups_ref': ['base.group_user']}"/> + </group> </group> <field name="notes" placeholder="Other Information ..." colspan="4"/> </page> @@ -65,6 +70,7 @@ <field name="identification_id" groups="base.group_hr_user"/> <field name="passport_id" groups="base.group_hr_user"/> <field name="bank_account_id"/> + <field name="otherid" groups="base.group_hr_user"/> </group> <group string="Contact Information"> <field name="address_home_id" @@ -85,11 +91,6 @@ <group string="Active" name="active_group"> <field name="active"/> </group> - <group> - <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/> - <field name="user_id" on_change="onchange_user(user_id)" string="Related User" - context="{'default_groups_ref': ['base.group_user']}"/> - </group> </group> </page> </notebook> @@ -111,7 +112,7 @@ <field name="work_phone"/> <field name="work_email"/> <field name="company_id" groups="base.group_multi_company"/> - <field name="department_id"/> + <field name="department_id" groups="hr.group_multi_departments"/> <field name="job_id"/> <field name="parent_id"/> <field name="coach_id" invisible="1"/> @@ -126,14 +127,14 @@ <field name="arch" type="xml"> <search string="Employees"> <field name="name" string="Employees" filter_domain="['|',('work_email','ilike',self),('name','ilike',self)]"/> - <field name="department_id"/> + <field name="department_id" groups="hr.group_multi_departments"/> <field name="category_ids" groups="base.group_hr_user"/> <field name="job_id" /> <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/> <group expand="0" string="Group By"> <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'parent_id'}"/> <filter string="Coach" icon="terp-personal" domain="[]" context="{'group_by':'coach_id'}"/> - <filter string="Department" domain="[]" context="{'group_by':'department_id'}"/> + <filter string="Department" domain="[]" context="{'group_by':'department_id'}" groups="hr.group_multi_departments"/> <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/> <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> </group> @@ -249,7 +250,7 @@ <field name="work_phone"/> <field name="work_email"/> <field name="company_id" groups="base.group_multi_company"/> - <field name="department_id"/> + <field name="department_id" groups="hr.group_multi_departments"/> <field name="job_id"/> <field name="coach_id" invisible="1"/> <field name="parent_id" invisible="1"/> @@ -357,7 +358,7 @@ </div> <div class="oe_right" name="buttons"/> <group name="employee_data"> - <field name="department_id" class="oe_inline"/> + <field name="department_id" groups="hr.group_multi_departments" class="oe_inline"/> <field name="no_of_recruitment" class="oe_inline" /> </group> <div attrs="{'invisible': [('state', '!=', 'recruit')]}"> @@ -383,7 +384,7 @@ <field name="arch" type="xml"> <tree string="Job" decoration-bf="message_unread==True"> <field name="name"/> - <field name="department_id"/> + <field name="department_id" groups="hr.group_multi_departments"/> <field name="no_of_employee"/> <field name="no_of_recruitment"/> <field name="expected_employees"/> @@ -402,11 +403,11 @@ <field name="name" string="Job"/> <filter domain="[('state','=','open')]" string="In Position"/> <filter domain="[('state','=','recruit')]" string="In Recruitment" name="in_recruitment"/> - <field name="department_id"/> + <field name="department_id" groups="hr.group_multi_departments"/> <separator/> <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/> <group expand="0" string="Group By"> - <filter string="Department" domain="[]" context="{'group_by':'department_id'}"/> + <filter string="Department" domain="[]" context="{'group_by':'department_id'}" groups="hr.group_multi_departments"/> <filter string="Status" domain="[]" context="{'group_by':'state'}"/> <filter string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> </group> @@ -516,7 +517,7 @@ id="menu_hr_department_tree" parent="menu_hr_root" sequence="1" - groups="base.group_hr_user"/> + groups="group_multi_departments"/> </data> </openerp> diff --git a/addons/hr/res_config.py b/addons/hr/res_config.py index ff505ee1114..2ecf26bb0bc 100644 --- a/addons/hr/res_config.py +++ b/addons/hr/res_config.py @@ -32,6 +32,10 @@ class hr_config_settings(osv.osv_memory): help ="""This installs the module hr_payroll."""), 'module_website_hr_recruitment': fields.boolean('Publish jobs on your website', help ="""This installs the module website_hr_recruitment"""), + 'group_multi_departments': fields.boolean( + "Manage employees by department", + implied_group='hr.group_multi_departments', group="base.group_hr_user", + help="""Allows you to manage employees by department."""), 'group_hr_attendance': fields.boolean('Track attendances for all employees', implied_group='base.group_hr_attendance', help="Allocates attendance group to all users."), diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml index 4f96791d8f8..5afa7e8ac45 100644 --- a/addons/hr/res_config_view.xml +++ b/addons/hr/res_config_view.xml @@ -12,4 +12,127 @@ <field name="state">open</field> </record> </data> + <data> + <record id="open_payroll_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="context" eval="{'search_default_category_id': ref('base.module_category_localization')}"/> + <field name="search_view_id" ref="base.view_module_filter"/> + </record> + + <record id="view_human_resources_configuration" model="ir.ui.view"> + <field name="name">hr settings</field> + <field name="model">hr.config.settings</field> + <field name="arch" type="xml"> + <form string="Configure Human Resources" class="oe_form_configuration"> + <header> + <button string="Apply" type="object" name="execute" class="oe_highlight"/> + or + <button string="Cancel" type="object" name="cancel" class="oe_link"/> + </header> + <separator string="Human Resources Management"/> + <group name="recruitment_grp"> + <label for="id" string="Talent Management"/> + <div name="recruitment"> + <div name="hr_recruitment"> + <field name="module_hr_recruitment" class="oe_inline"/> + <label for="module_hr_recruitment"/> + </div> + <div> + <field name="module_hr_evaluation" class="oe_inline"/> + <label for="module_hr_evaluation"/> + </div> + </div> + </group> + <group> + <label for="id" string="Additional Features"/> + <div> + <div> + <field name="module_hr_holidays" class="oe_inline"/> + <label for="module_hr_holidays"/> + </div> + <div> + <field name="module_hr_expense" class="oe_inline"/> + <label for="module_hr_expense"/> + </div> + <div> + <field name="module_hr_gamification" class="oe_inline"/> + <label for="module_hr_gamification"/> + </div> + <div> + <field name="group_multi_departments" class="oe_inline"/> + <label for="group_multi_departments"/> + </div> + </div> + </group> + <group name="timesheet_grp"> + <label for="id" string="Time Tracking"/> + <div> + <div> + <field name="module_hr_timesheet" on_change="onchange_hr_timesheet(module_hr_timesheet)" class="oe_inline"/> + <label for="module_hr_timesheet"/> + </div> + <div name="hr_timesheet"> + <field name="module_hr_timesheet_sheet" class="oe_inline"/> + <label for="module_hr_timesheet_sheet"/> + </div> + <div name="account_analytic_analysis"> + <field name="module_account_analytic_analysis" class="oe_inline"/> + <label for="module_account_analytic_analysis"/> + </div> + <div name="hr_attendance"> + <field name="module_hr_attendance" on_change="onchange_hr_attendance(module_hr_attendance)" class="oe_inline"/> + <label for="module_hr_attendance"/> + </div> + <div> + <field name="group_hr_attendance" on_change="onchange_group_hr_attendance(group_hr_attendance)" class="oe_inline"/> + <label for="group_hr_attendance"/> + </div> + </div> + </group> + <group name="contract_grp"> + <label for="id" string="Contracts"/> + <div> + <div> + <field name="module_hr_contract" class="oe_inline"/> + <label for="module_hr_contract"/> + </div> + <div name="hr_payroll"> + <field name="module_hr_payroll" class="oe_inline"/> + <label for="module_hr_payroll"/> + <button name="%(open_payroll_modules)d" type="action" + string="Install your country's payroll" icon="gtk-go-forward" + attrs="{'invisible': [('module_hr_payroll','=',False)]}" class="oe_link"/> + </div> + </div> + </group> + <group name="website_grp"> + <label for="id" string="Website"/> + <div> + <div> + <field name="module_website_hr_recruitment" class="oe_inline"/> + <label for="module_website_hr_recruitment"/> + </div> + </div> + </group> + </form> + </field> + </record> + + <record id="action_human_resources_configuration" model="ir.actions.act_window"> + <field name="name">Configure Human Resources</field> + <field name="res_model">hr.config.settings</field> + <field name="view_id" ref="view_human_resources_configuration"/> + <field name="view_mode">form</field> + <field name="target">inline</field> + </record> + + <menuitem id="menu_human_resources_global_settings" name="Settings" + parent="menu_human_resources_configuration" + action="action_human_resources_configuration" + sequence="0"/> + + + </data> </openerp> diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index a16f8074cf8..114cea97591 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -25,6 +25,11 @@ <field name="category_id" ref="base.module_category_hidden"/> </record> + <record id="group_multi_departments" model="res.groups"> + <field name="name">Manage employees by department</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + </data> <data noupdate="1"> |
