Amit Patel (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-employee-form-view-apa into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-employee-form-view-apa/+merge/123229
Hello ,
Improved Employees' form view which are defined in this pad :
http://pad.openerp.com/p/rd-project.task-4206-9UYEXAST
Thanks
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-employee-form-view-apa/+merge/123229
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-employee-form-view-apa.
=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml 2012-09-06 10:46:24 +0000
+++ hr/hr_view.xml 2012-09-07 08:37:21 +0000
@@ -20,16 +20,12 @@
<field name="arch" type="xml">
<form string="Employee" version="7.0">
<sheet>
- <field name="image_medium" widget='image' class="oe_right oe_avatar"/>
+ <field name="image_medium" widget='image' class="oe_left oe_avatar"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
- <label for="job_id" class="oe_edit_only"/>
- <h2>
- <field name="job_id" options='{"no_open": true}' domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
- </h2>
<label for="category_ids" class="oe_edit_only"/>
<field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time"/>
</div>
@@ -37,44 +33,55 @@
<!-- Put here related buttons -->
</div>
<notebook>
- <page string="Information">
+ <page string="Public Information">
<group>
- <group>
+ <group string="Contact Information">
+ <field name="work_email" widget="email"/>
+ <field name="work_phone"/>
+ <field name="mobile_phone"/>
+ </group>
+ <group string="Position">
<field name="department_id" on_change="onchange_department_id(department_id)"/>
- <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)"/>
+ <field name="job_id" options='{"no_open": true}' domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
<field name="parent_id"/>
<field name="coach_id"/>
</group>
<group>
- <field name="work_email" widget="email"/>
- <field name="work_phone"/>
- <field name="address_id" on_change="onchange_address_id(address_id)"/>
- <field name="mobile_phone"/>
- <field name="identification_id" groups="base.group_hr_user"/>
- <field name="passport_id" groups="base.group_hr_user"/>
- <field name="otherid" groups="base.group_hr_user"/>
- </group>
- <group name="active_group">
- <field name="active"/>
+ <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"/>
+ <field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": true, "highlight_first_line": true}'/>
</group>
</group>
<field name="notes" placeholder="Other Information ..." colspan="4"/>
</page>
<page string="Personal Information" groups="base.group_hr_user">
- <group col="4">
- <group>
+ <group>
+ <group string="Citizenship & other info">
<field name="country_id" options='{"no_open": true}'/>
+ <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="address_home_id"/>
- </group>
- <group>
+ <field name="otherid" groups="base.group_hr_user"/>
+ </group>
+ <group string="Contact Information">
+ <field name="address_home_id" context="{'show_address': 1}" options='{"always_reload": true, "highlight_first_line": true}'/>
+ </group>
+ <group string="Status">
<field name="gender"/>
<field name="marital"/>
+ </group>
+ <group string="Birth">
<field name="birthday"/>
</group>
</group>
</page>
+ <page string="HR Settings" groups="base.group_hr_user">
+ <group>
+ <group string="Active" name="active_group">
+ <field name="active"/>
+ </group>
+ </group>
+ </page>
</notebook>
</sheet>
</form>
=== modified file 'hr_attendance/hr_attendance_view.xml'
--- hr_attendance/hr_attendance_view.xml 2012-09-02 13:30:14 +0000
+++ hr_attendance/hr_attendance_view.xml 2012-09-07 08:37:21 +0000
@@ -123,14 +123,15 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
- <field name="active" position="before">
- <label for="state"/>
- <div>
- <field name="state" class="oe_inline"/> -
- <button class="oe_link" name="attendance_action_change" states="present" string="Sign Out" type="object" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
- <button class="oe_link" name="attendance_action_change" states="absent" string="Sign In" type="object" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
- </div>
- </field>
+ <xpath expr="//group[@name='active_group']" position="before">
+ <group string="Attendance">
+ <div>
+ <field name="state" class="oe_inline"/> -
+ <button class="oe_link" name="attendance_action_change" states="present" string="Sign Out" type="object" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
+ <button class="oe_link" name="attendance_action_change" states="absent" string="Sign In" type="object" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
+ </div>
+ </group>
+ </xpath>
</field>
</record>
=== modified file 'hr_contract/hr_contract_view.xml'
--- hr_contract/hr_contract_view.xml 2012-08-08 12:48:39 +0000
+++ hr_contract/hr_contract_view.xml 2012-09-07 08:37:21 +0000
@@ -1,7 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
+
+
+<!-- Contracts Button on Employee Form -->
+ <act_window
+ context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
+ id="act_hr_employee_2_hr_contract"
+ name="Contracts"
+ res_model="hr.contract"
+ src_model="hr.employee"
+ groups="base.group_hr_manager"/>
+
<menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_configuration" sequence="30" groups="base.group_no_one"/>
<record id="hr_hr_employee_view_form2" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2</field>
@@ -9,19 +20,20 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
- <xpath expr="//field[@name='parent_id']" position="before">
+ <xpath expr="//div[@name='button_box']" position="inside">
+ <button name="%(act_hr_employee_2_hr_contract)d" string="Contracts" type="action" class="oe_inline oe_right"/>
+ </xpath>
+ <xpath expr="//field[@name='coach_id']" position="after">
<field name="manager"/>
</xpath>
<xpath expr="//group[@name='active_group']" position="before">
- <group>
+ <group string="Contract">
+ <field name="medic_exam" string="Medical Exam"/>
<field name="vehicle"/>
<field name="vehicle_distance"/>
</group>
</xpath>
- <field name="active" position="before">
- <field name="medic_exam" string="Medical Exam"/>
- </field>
- <field name="birthday" position="before">
+ <field name="marital" position="after">
<field name="children"/>
</field>
<field name="birthday" position="after">
@@ -177,15 +189,5 @@
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6" groups="base.group_no_one"/>
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_hr_manager"/>
- <!-- Contracts Button on Employee Form -->
-
- <act_window
- context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
- id="act_hr_employee_2_hr_contract"
- name="Contracts"
- res_model="hr.contract"
- src_model="hr.employee"
- groups="base.group_hr_manager"/>
-
</data>
</openerp>
=== modified file 'hr_evaluation/hr_evaluation_view.xml'
--- hr_evaluation/hr_evaluation_view.xml 2012-09-04 11:57:23 +0000
+++ hr_evaluation/hr_evaluation_view.xml 2012-09-07 08:37:21 +0000
@@ -128,14 +128,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
- <page string="Personal Information" position="after">
- <page string="Appraisal" groups="base.group_hr_user">
- <group col="4">
- <field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
- <field name="evaluation_date"/>
- </group>
- </page>
- </page>
+ <xpath expr="//group[@name='active_group']" position="before">
+ <group string="Appraisals">
+ <field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
+ <field name="evaluation_date"/>
+ </group>
+ </xpath>
</field>
</record>
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2012-09-03 09:18:18 +0000
+++ hr_holidays/hr_holidays_view.xml 2012-09-07 08:37:21 +0000
@@ -513,13 +513,17 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
- <field name="active" position="before">
- <label for="remaining_leaves"/>
- <div>
- <field name="remaining_leaves" class="oe_inline"/>
- <button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline oe_right"/>
- </div>
- </field>
+ <xpath expr="//group[@name='active_group']" position="before">
+ <group string="Leaves">
+ <label for="remaining_leaves"/>
+ <div>
+ <field name="remaining_leaves" class="oe_inline"/>
+ </div>
+ </group>
+ </xpath>
+ <xpath expr="//div[@name='button_box']" position="inside">
+ <button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline oe_right"/>
+ </xpath>
</field>
</record>
=== modified file 'hr_payroll/hr_payroll_view.xml'
--- hr_payroll/hr_payroll_view.xml 2012-08-08 12:48:39 +0000
+++ hr_payroll/hr_payroll_view.xml 2012-09-07 08:37:21 +0000
@@ -386,7 +386,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//div[@name='button_box']" position="inside">
- <button name="%(act_hr_employee_payslip_list)d" string="Payslips" type="action"/>
+ <button name="%(act_hr_employee_payslip_list)d" string="Payslips" type="action" class="oe_inline oe_right"/>
</xpath>
</data>
</field>
=== modified file 'hr_timesheet/hr_timesheet_view.xml'
--- hr_timesheet/hr_timesheet_view.xml 2012-09-01 07:21:37 +0000
+++ hr_timesheet/hr_timesheet_view.xml 2012-09-07 08:37:21 +0000
@@ -131,16 +131,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
- <page string="Personal Information" position="after">
- <page string="Timesheets" groups="base.group_hr_user">
- <group>
- <group col="2">
- <field name="product_id" domain="[('type','=','service')]"/>
- <field name="journal_id"/>
- </group>
- </group>
- </page>
- </page>
+ <xpath expr="//group[@name='active_group']" position="before">
+ <group string="Timesheets">
+ <field name="product_id" domain="[('type','=','service')]"/>
+ <field name="journal_id"/>
+ </group>
+ </xpath>
</field>
</record>
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet_view.xml'
--- hr_timesheet_sheet/hr_timesheet_sheet_view.xml 2012-08-13 16:06:57 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet_view.xml 2012-09-07 08:37:21 +0000
@@ -350,7 +350,7 @@
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_employee_extd_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
- <button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action"/>
+ <button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action" class="oe_inline oe_right"/>
</xpath>
</field>
</record>
=== modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll_view.xml'
--- l10n_be_hr_payroll/l10n_be_hr_payroll_view.xml 2012-08-08 13:06:14 +0000
+++ l10n_be_hr_payroll/l10n_be_hr_payroll_view.xml 2012-09-07 08:37:21 +0000
@@ -38,11 +38,11 @@
<record id="hr_employee_form__l10n_be_view_for" model="ir.ui.view">
<field name="name">hr.employee.inherit.form</field>
<field name="model">hr.employee</field>
- <field name="inherit_id" ref="hr.view_employee_form"/>
+ <field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
<field name="priority">30</field>
<field name="arch" type="xml">
<data>
- <xpath expr="//field[@name='gender']" position="before">
+ <xpath expr="//field[@name='vehicle_distance']" position="after">
<field name="resident_bool" eval="False"/>
</xpath>
<xpath expr="//field[@name='marital']" position="after">
=== modified file 'portal_event/event_view.xml'
--- portal_event/event_view.xml 2012-08-09 06:05:16 +0000
+++ portal_event/event_view.xml 2012-09-07 08:37:21 +0000
@@ -3,20 +3,19 @@
<data>
<!-- add visibility field to the event form view -->
- <record id="view_employee_form" model="ir.ui.view">
+ <record id="view_event_form_portal" model="ir.ui.view">
<field name="name">portal.event.form</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
<field name="arch" type="xml">
<xpath expr="//page[last()]" position="after">
<page string="Portal Settings">
- <group>
+ <group>
<field name="visibility"/>
</group>
</page>
</xpath>
</field>
</record>
-
</data>
</openerp>
=== modified file 'portal_hr_employees/hr_employee_view.xml'
--- portal_hr_employees/hr_employee_view.xml 2012-09-06 10:46:24 +0000
+++ portal_hr_employees/hr_employee_view.xml 2012-09-07 08:37:21 +0000
@@ -8,12 +8,8 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
- <xpath expr="//page[last()]" position="after">
- <page string="Portal Settings">
- <group>
- <field name="visibility"/>
- </group>
- </page>
+ <xpath expr="//field[@name='active']" position="before">
+ <field name="visibility"/>
</xpath>
</field>
</record>
_______________________________________________
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