hr_holidays_usability: various fixes + usability improvements
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -84,7 +84,7 @@ self.pool.get('email.template').send_mail(cr, uid, template_id, object.id, force
|
||||
<li>Start date : ${object.vacation_date_from or ''} ${object.vacation_time_from or ''}</li>
|
||||
<li>End date : ${object.vacation_date_to or ''} ${object.vacation_time_to or ''}</li>
|
||||
% endif
|
||||
<li>Number of days : ${object.number_of_days_temp or '0'}</li>
|
||||
<li>Number of days : ${object.number_of_days or '0'}</li>
|
||||
<li>Leave type : ${object.holiday_status_id.name or ''}</li>
|
||||
<li>Description : ${object.name or ''}</li>
|
||||
% if object.notes:
|
||||
|
||||
@@ -37,6 +37,37 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_holiday" model="ir.ui.view">
|
||||
<field name="name">hr_holidays_usability.leave_request_tree</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="inherit_id" ref="hr_holidays.view_holiday"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="number_of_days" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="number_of_days" position="after">
|
||||
<field name="number_of_days_remove"/>
|
||||
</field>
|
||||
<field name="date_from" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="date_from" position="after">
|
||||
<field name="vacation_date_from"/>
|
||||
<field name="vacation_time_from"/>
|
||||
</field>
|
||||
<field name="date_to" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="date_to" position="after">
|
||||
<field name="vacation_date_to"/>
|
||||
<field name="vacation_time_to"/>
|
||||
</field>
|
||||
<field name="holiday_status_id" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="edit_holiday_status_form" model="ir.ui.view">
|
||||
<field name="name">hr_holidays_usability.hr.holidays.status.form</field>
|
||||
<field name="model">hr.holidays.status</field>
|
||||
|
||||
Reference in New Issue
Block a user