From 6e8e9fa1aa721ebece8a1416ade82733bac8767c Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 11 May 2016 18:42:52 +0200 Subject: [PATCH] Avoid privacy issues --- hr_holidays_usability/hr_holidays.py | 5 +++ hr_holidays_usability/hr_holidays_mail.xml | 6 +-- hr_holidays_usability/hr_holidays_view.xml | 43 ++++++++++++---------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/hr_holidays_usability/hr_holidays.py b/hr_holidays_usability/hr_holidays.py index 4dc84cc..ef05030 100644 --- a/hr_holidays_usability/hr_holidays.py +++ b/hr_holidays_usability/hr_holidays.py @@ -225,6 +225,11 @@ class HrHolidays(models.Model): posted_date = fields.Date( string='Posted Date', track_visibility='onchange') number_of_days_temp = fields.Float(string="Number of days") + # The 'name' field is displayed publicly in the calendar + # So the label should not be 'Description' but 'Public Title' + name = fields.Char( + string='Public Title', help="Warning: this title is shown publicly in the " + "calendar. Don't write private/personnal information in this field.") @api.one @api.constrains( diff --git a/hr_holidays_usability/hr_holidays_mail.xml b/hr_holidays_usability/hr_holidays_mail.xml index 70f43e1..38e16f5 100644 --- a/hr_holidays_usability/hr_holidays_mail.xml +++ b/hr_holidays_usability/hr_holidays_mail.xml @@ -89,10 +89,8 @@ if not object.no_email_notification: % endif
  • Number of days : ${object.number_of_days < 0 and object.number_of_days * -1 or object.number_of_days}
  • Leave type : ${object.holiday_status_id.name or ''}
  • -
  • Description : ${object.name or ''}
  • -% if object.notes: -
  • Notes : ${object.notes or ''}
  • -% endif +
  • Public title : ${object.name or ''}
  • +
  • Notes for the manager : ${object.notes or ''}
  • % if ctx.get('wkf_tracker') == 'submitted': diff --git a/hr_holidays_usability/hr_holidays_view.xml b/hr_holidays_usability/hr_holidays_view.xml index 82693bb..b105658 100644 --- a/hr_holidays_usability/hr_holidays_view.xml +++ b/hr_holidays_usability/hr_holidays_view.xml @@ -35,26 +35,31 @@ hr_holidays.edit_holiday_new is used for both leaves and allocation --> - - - - +