From 8a6a4766d97df3b6b1d718bf12b8da242e532ed1 Mon Sep 17 00:00:00 2001 From: "Simon Genin (ges)" Date: Mon, 15 Jun 2020 12:11:16 +0000 Subject: [PATCH] [IMP] hr_employee: improve form usability Improve slightly the layout of some forms related to employee and contracts. Modified modules: hr hr_expense hr_holidays timesheet_grid hr_contract_salary hr_payroll_account Task ID 2277298 closes odoo/odoo#52981 Related: odoo/enterprise#11156 Signed-off-by: Yannick Tivisse (yti) --- addons/hr/models/hr_employee.py | 2 +- addons/hr/views/hr_employee_public_views.xml | 5 +++-- addons/hr/views/hr_employee_views.xml | 14 ++++++++++---- addons/hr/views/res_users.xml | 9 ++++++--- addons/hr_contract/views/hr_contract_views.xml | 2 +- addons/hr_expense/views/hr_expense_views.xml | 8 +++++++- addons/hr_holidays/views/hr_views.xml | 8 +++++++- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/addons/hr/models/hr_employee.py b/addons/hr/models/hr_employee.py index 6c1d995b628..cdf743cdeb2 100644 --- a/addons/hr/models/hr_employee.py +++ b/addons/hr/models/hr_employee.py @@ -89,7 +89,7 @@ class HrEmployeePrivate(models.Model): study_school = fields.Char("School", groups="hr.group_hr_user", tracking=True) emergency_contact = fields.Char("Emergency Contact", groups="hr.group_hr_user", tracking=True) emergency_phone = fields.Char("Emergency Phone", groups="hr.group_hr_user", tracking=True) - km_home_work = fields.Integer(string="Km Home-Work", groups="hr.group_hr_user", tracking=True) + km_home_work = fields.Integer(string="Home-Work Distance", groups="hr.group_hr_user", tracking=True) image_1920 = fields.Image(default=_default_image) phone = fields.Char(related='address_home_id.phone', related_sudo=False, string="Private Phone", groups="hr.group_hr_user") diff --git a/addons/hr/views/hr_employee_public_views.xml b/addons/hr/views/hr_employee_public_views.xml index d2001a8fc17..2378a70e6e0 100644 --- a/addons/hr/views/hr_employee_public_views.xml +++ b/addons/hr/views/hr_employee_public_views.xml @@ -62,6 +62,7 @@ + @@ -73,8 +74,8 @@ context="{'show_address': 1}" options='{"always_reload": True, "highlight_first_line": True}'/> - - + + diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml index 959159ec295..713ff44bf25 100644 --- a/addons/hr/views/hr_employee_views.xml +++ b/addons/hr/views/hr_employee_views.xml @@ -89,12 +89,12 @@ - + @@ -105,9 +105,10 @@ + - - + + @@ -133,7 +134,12 @@ - + diff --git a/addons/hr/views/res_users.xml b/addons/hr/views/res_users.xml index 98ea67ee750..5b2c4462eb2 100644 --- a/addons/hr/views/res_users.xml +++ b/addons/hr/views/res_users.xml @@ -93,6 +93,10 @@ + + + + @@ -108,9 +112,8 @@ options='{"always_reload": True, "highlight_first_line": True}' attrs="{'readonly': [('can_edit', '=', False)]}"/> - - - + + diff --git a/addons/hr_contract/views/hr_contract_views.xml b/addons/hr_contract/views/hr_contract_views.xml index 6fc0d4ae5c3..a7f9b55538d 100644 --- a/addons/hr_contract/views/hr_contract_views.xml +++ b/addons/hr_contract/views/hr_contract_views.xml @@ -195,7 +195,7 @@ - + diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index 43842dbf3a9..9aa4e3509c2 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -9,6 +9,9 @@ + + 0 + @@ -18,7 +21,7 @@ - + @@ -31,6 +34,9 @@ + + 0 + diff --git a/addons/hr_holidays/views/hr_views.xml b/addons/hr_holidays/views/hr_views.xml index 1c9a7690e52..d1a79e078cd 100644 --- a/addons/hr_holidays/views/hr_views.xml +++ b/addons/hr_holidays/views/hr_views.xml @@ -118,6 +118,9 @@ + + 0 +
@@ -163,7 +166,7 @@ - + @@ -215,6 +218,9 @@ + + 0 +