From 5ee535f297d0fcd6bd6553da76ab23bcb5386e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 6 Aug 2018 11:26:16 +0200 Subject: [PATCH] [IMP] hr_holidays: improve leave type form view Purpose: according to tasks's specifications * place elements in order it is not changing according what you select * https://drive.google.com/a/odoo.com/file/d/18gat1lw8mo9NTqU3mDuXqvuZXlMRzASX/view?usp=drivesdk * https://drive.google.com/a/odoo.com/file/d/1fLKpnW6RcaQetYJ0Ep7vZ7YHr_pW8-x_/view?usp=drivesdk This commit is linked to task ID 1871812 and PR #26180. --- addons/hr_holidays/models/hr_leave_type.py | 16 ++++++++-------- .../hr_holidays/views/hr_leave_type_views.xml | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/addons/hr_holidays/models/hr_leave_type.py b/addons/hr_holidays/models/hr_leave_type.py index 17d5c9b190f..216e1002de7 100644 --- a/addons/hr_holidays/models/hr_leave_type.py +++ b/addons/hr_holidays/models/hr_leave_type.py @@ -41,7 +41,7 @@ class HolidaysType(models.Model): ('wheat', 'Wheat'), ('ivory', 'Ivory')], string='Color in Report', required=True, default='red', help='This color will be used in the leaves summary located in Reporting > Leaves by Department.') - limit = fields.Boolean('Unlimited', + limit = fields.Boolean('Exceed Allocation', help="If you select this check box, the system will allow the employees to ask" "for leaves without allocating some beforehand") active = fields.Boolean('Active', default=True, @@ -58,16 +58,16 @@ class HolidaysType(models.Model): company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.user.company_id) - validation_type = fields.Selection([('hr', 'Human Resource Responsible'), - ('manager', 'Manager'), + validation_type = fields.Selection([('hr', 'Human Resource officer'), + ('manager', 'Employee Manager'), ('both', 'Double Validation')], default='hr', string='Validation By') - employee_applicability = fields.Selection([('both', 'On Leave As Well As On Allocation'), - ('leave', 'Only On Leave'), - ('allocation', 'Only On Allocation')], - default=lambda self: 'leave' if self.limit else 'both', string='Available For Employee :', + employee_applicability = fields.Selection([('both', 'Both'), + ('leave', 'Can be requested'), + ('allocation', 'Can be allocated')], + default=lambda self: 'leave' if self.limit else 'both', string='Mode', help='This leave type will be available on Leave / Allocation request based on selected value') validity_start = fields.Date("Start Date", default=fields.Date.today, @@ -84,7 +84,7 @@ class HolidaysType(models.Model): ('half', 'Half-day'), ('hour', 'Hours')], default='day', string='Take Leaves in', required=True) - accrual = fields.Boolean('Is Accrual', default=False, + accrual = fields.Boolean('Accrual', default=False, help='This option forces this type of leave to be allocated accrually') unpaid = fields.Boolean('Is Unpaid', default=False) diff --git a/addons/hr_holidays/views/hr_leave_type_views.xml b/addons/hr_holidays/views/hr_leave_type_views.xml index ea0c213dfb2..741dab3354e 100644 --- a/addons/hr_holidays/views/hr_leave_type_views.xml +++ b/addons/hr_holidays/views/hr_leave_type_views.xml @@ -34,25 +34,25 @@ - - - - - - + + + + + - - - + + + +