From 10c8a2e6818e324fe52730ac6aa7728515db390f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 10 Jun 2015 14:44:18 +0200 Subject: [PATCH] hr_holidays_usability: various fixes + usability improvements --- hr_holidays_usability/hr_holidays.py | 8 +++--- hr_holidays_usability/hr_holidays_mail.xml | 2 +- hr_holidays_usability/hr_holidays_view.xml | 31 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/hr_holidays_usability/hr_holidays.py b/hr_holidays_usability/hr_holidays.py index 1abb50d..e311323 100644 --- a/hr_holidays_usability/hr_holidays.py +++ b/hr_holidays_usability/hr_holidays.py @@ -153,25 +153,25 @@ class HrHolidays(orm.Model): _columns = { 'vacation_date_from': fields.date( - 'First Day of Vacation', + 'First Day of Vacation', track_visibility='onchange', help="Enter the first day of vacation. For example, if " "you leave one full calendar week, the first day of vacation " "is Monday morning (and not Friday of the week before)"), 'vacation_time_from': fields.selection([ ('morning', 'Morning'), ('noon', 'Noon'), - ], "Start of Vacation", + ], "Start of Vacation", track_visibility='onchange', help="For example, if you leave one full calendar week, " "the first day of vacation is Monday Morning"), 'vacation_date_to': fields.date( - 'Last Day of Vacation', + 'Last Day of Vacation', track_visibility='onchange', help="Enter the last day of vacation. For example, if you " "leave one full calendar week, the last day of vacation is " "Friday evening (and not Monday of the week after)"), 'vacation_time_to': fields.selection([ ('noon', 'Noon'), ('evening', 'Evening'), - ], "End of Vacation", + ], "End of Vacation", track_visibility='onchange', help="For example, if you leave one full calendar week, " "the end of vacation is Friday Evening"), 'number_of_days_remove': fields.function( diff --git a/hr_holidays_usability/hr_holidays_mail.xml b/hr_holidays_usability/hr_holidays_mail.xml index de0ee24..54f9e26 100644 --- a/hr_holidays_usability/hr_holidays_mail.xml +++ b/hr_holidays_usability/hr_holidays_mail.xml @@ -84,7 +84,7 @@ self.pool.get('email.template').send_mail(cr, uid, template_id, object.id, force
  • Start date : ${object.vacation_date_from or ''} ${object.vacation_time_from or ''}
  • End date : ${object.vacation_date_to or ''} ${object.vacation_time_to or ''}
  • % endif -
  • Number of days : ${object.number_of_days_temp or '0'}
  • +
  • Number of days : ${object.number_of_days or '0'}
  • Leave type : ${object.holiday_status_id.name or ''}
  • Description : ${object.name or ''}
  • % if object.notes: diff --git a/hr_holidays_usability/hr_holidays_view.xml b/hr_holidays_usability/hr_holidays_view.xml index e6123c0..e2f97f5 100644 --- a/hr_holidays_usability/hr_holidays_view.xml +++ b/hr_holidays_usability/hr_holidays_view.xml @@ -37,6 +37,37 @@ + + hr_holidays_usability.leave_request_tree + hr.holidays + + + + 1 + + + + + + 1 + + + + + + + 1 + + + + + + + 0 + + + + hr_holidays_usability.hr.holidays.status.form hr.holidays.status