From 158f779b46ff0e854a548179d8d9749cd9cf0162 Mon Sep 17 00:00:00 2001 From: hbh Date: Fri, 4 Nov 2016 16:18:36 +0530 Subject: [PATCH] [IMP] Various usability improvments on attendance and HR application, - Print Badge report set as pdf instead of html - Replace the 'Status' separator by 'Attendance' in HR Settings tab - Add a new Stat button 'Attendance' and set icon as a last action of employee - 'Manual Attendance' field should only be visible if 'Related User' field is set - 'PIN' field should only be visible if in setting enabled - 'Payslips' stat button not displayed if user has no access rights - If no start/end dates selected then '-' will be removed on 'Trial Period Duration' field - Rearrange fields on employee form's 'Contact Information' [IMP] Various usability improvments on attendance and HR application --- addons/hr/models/hr.py | 2 +- addons/hr/views/hr_views.xml | 4 +-- .../report/hr_employee_badge.xml | 2 +- .../static/src/less/hr_attendance.less | 6 ++--- .../views/hr_attendance_view.xml | 11 ++++++++ .../hr_attendance/views/hr_employee_view.xml | 27 ++++++++++++++++--- .../hr_contract/views/hr_contract_views.xml | 5 ++-- addons/hr_payroll/views/hr_payroll_views.xml | 2 +- 8 files changed, 46 insertions(+), 13 deletions(-) diff --git a/addons/hr/models/hr.py b/addons/hr/models/hr.py index 787287fe289..d0d5ff5af4b 100644 --- a/addons/hr/models/hr.py +++ b/addons/hr/models/hr.py @@ -126,7 +126,7 @@ class Employee(models.Model): ('divorced', 'Divorced') ], string='Marital Status') department_id = fields.Many2one('hr.department', string='Department') - address_id = fields.Many2one('res.partner', string='Working Address') + address_id = fields.Many2one('res.partner', string='Work Address') address_home_id = fields.Many2one('res.partner', string='Home Address') bank_account_id = fields.Many2one('res.partner.bank', string='Bank Account Number', domain="[('partner_id', '=', address_home_id)]", help='Employee bank salary account') diff --git a/addons/hr/views/hr_views.xml b/addons/hr/views/hr_views.xml index f13c33d035f..9c866f50faf 100644 --- a/addons/hr/views/hr_views.xml +++ b/addons/hr/views/hr_views.xml @@ -59,9 +59,9 @@ - + @@ -98,7 +98,7 @@ - + diff --git a/addons/hr_attendance/report/hr_employee_badge.xml b/addons/hr_attendance/report/hr_employee_badge.xml index 902131334b0..d1a6c78645a 100644 --- a/addons/hr_attendance/report/hr_employee_badge.xml +++ b/addons/hr_attendance/report/hr_employee_badge.xml @@ -4,7 +4,7 @@ id="hr_employee_print_badge" string="Print Badge" model="hr.employee" - report_type="qweb-html" + report_type="qweb-pdf" name="hr_attendance.print_employee_badge" file="hr_attendance.print_employee_badge"/> diff --git a/addons/hr_attendance/static/src/less/hr_attendance.less b/addons/hr_attendance/static/src/less/hr_attendance.less index 12a356159d4..66195e3d6c1 100644 --- a/addons/hr_attendance/static/src/less/hr_attendance.less +++ b/addons/hr_attendance/static/src/less/hr_attendance.less @@ -9,15 +9,15 @@ .oe_hr_attendance_status { font-size: 1.2em; - margin-right: .3em; + margin-right: .1em; display: inline-block; color: @odoo-brand-secondary; &.oe_hr_attendance_status_green { - color: @brand-success; + color: @brand-success !important; } &.oe_hr_attendance_status_red { - color: @brand-danger; + color: @brand-danger !important; } } diff --git a/addons/hr_attendance/views/hr_attendance_view.xml b/addons/hr_attendance/views/hr_attendance_view.xml index 569c3c9f6ea..d246b247422 100644 --- a/addons/hr_attendance/views/hr_attendance_view.xml +++ b/addons/hr_attendance/views/hr_attendance_view.xml @@ -92,6 +92,17 @@ + + Attendances + hr.attendance + form + tree,form + {'search_default_employee_id': active_id, 'default_employee_id': active_id} + +

No attendance records to display.

+
+
+ Attendance Analysis hr.attendance diff --git a/addons/hr_attendance/views/hr_employee_view.xml b/addons/hr_attendance/views/hr_employee_view.xml index 48e8d6ee1b2..52cbd6c6bfe 100644 --- a/addons/hr_attendance/views/hr_employee_view.xml +++ b/addons/hr_attendance/views/hr_employee_view.xml @@ -9,18 +9,39 @@
-
- - + +
+ + hr.employee.inherit + hr.employee + + + + + + + + + + + hr.employee.kanban diff --git a/addons/hr_contract/views/hr_contract_views.xml b/addons/hr_contract/views/hr_contract_views.xml index 7e2c77e8992..f54ecce28c7 100644 --- a/addons/hr_contract/views/hr_contract_views.xml +++ b/addons/hr_contract/views/hr_contract_views.xml @@ -108,11 +108,12 @@ diff --git a/addons/hr_payroll/views/hr_payroll_views.xml b/addons/hr_payroll/views/hr_payroll_views.xml index 1a33289af86..55600f3f27b 100644 --- a/addons/hr_payroll/views/hr_payroll_views.xml +++ b/addons/hr_payroll/views/hr_payroll_views.xml @@ -390,7 +390,7 @@ class="oe_stat_button" icon="fa-money" type="action" - groups="hr.group_hr_user"> + groups="hr_payroll.group_hr_payroll_user">