Avoid privacy issues
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -89,10 +89,8 @@ if not object.no_email_notification:
|
||||
% endif
|
||||
<li>Number of days : ${object.number_of_days < 0 and object.number_of_days * -1 or object.number_of_days}</li>
|
||||
<li>Leave type : ${object.holiday_status_id.name or ''}</li>
|
||||
<li>Description : ${object.name or ''}</li>
|
||||
% if object.notes:
|
||||
<li>Notes : ${object.notes or ''}</li>
|
||||
% endif
|
||||
<li>Public title : ${object.name or ''}</li>
|
||||
<li>Notes for the manager : ${object.notes or ''}</li>
|
||||
</ul>
|
||||
|
||||
% if ctx.get('wkf_tracker') == 'submitted':
|
||||
|
||||
@@ -35,7 +35,11 @@ hr_holidays.edit_holiday_new is used for both leaves and allocation -->
|
||||
<field name="vacation_date_to" attrs="{'required': [('type', '=', 'remove')], 'invisible': [('type', '=', 'add')]}"/>
|
||||
<field name="vacation_time_to" attrs="{'required': [('type', '=', 'remove')], 'invisible': [('type', '=', 'add')]}"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='department_id']/.." position="after">
|
||||
<field name="notes" position="replace">
|
||||
<group name="bottom">
|
||||
<group string="Message for the Manager" name="notes">
|
||||
<field name="notes" nolabel="1" placeholder="Add a message for your manager..."/>
|
||||
</group>
|
||||
<group string="Counter for this leave type" name="counters" attrs="{'invisible': [('limit', '=', True)]}">
|
||||
<field name="limit" invisible="1"/>
|
||||
<label for="total_allocated_leaves"/>
|
||||
@@ -54,7 +58,8 @@ hr_holidays.edit_holiday_new is used for both leaves and allocation -->
|
||||
<label string=" days" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</xpath>
|
||||
</group>
|
||||
</field>
|
||||
<field name="department_id" position="after">
|
||||
<field name="posted_date" groups="base.group_hr_manager"/>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user