hr_holidays_usability: various fixes + usability improvements
This commit is contained in:
@@ -153,25 +153,25 @@ class HrHolidays(orm.Model):
|
|||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'vacation_date_from': fields.date(
|
'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 "
|
help="Enter the first day of vacation. For example, if "
|
||||||
"you leave one full calendar week, the first day of vacation "
|
"you leave one full calendar week, the first day of vacation "
|
||||||
"is Monday morning (and not Friday of the week before)"),
|
"is Monday morning (and not Friday of the week before)"),
|
||||||
'vacation_time_from': fields.selection([
|
'vacation_time_from': fields.selection([
|
||||||
('morning', 'Morning'),
|
('morning', 'Morning'),
|
||||||
('noon', 'Noon'),
|
('noon', 'Noon'),
|
||||||
], "Start of Vacation",
|
], "Start of Vacation", track_visibility='onchange',
|
||||||
help="For example, if you leave one full calendar week, "
|
help="For example, if you leave one full calendar week, "
|
||||||
"the first day of vacation is Monday Morning"),
|
"the first day of vacation is Monday Morning"),
|
||||||
'vacation_date_to': fields.date(
|
'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 "
|
help="Enter the last day of vacation. For example, if you "
|
||||||
"leave one full calendar week, the last day of vacation is "
|
"leave one full calendar week, the last day of vacation is "
|
||||||
"Friday evening (and not Monday of the week after)"),
|
"Friday evening (and not Monday of the week after)"),
|
||||||
'vacation_time_to': fields.selection([
|
'vacation_time_to': fields.selection([
|
||||||
('noon', 'Noon'),
|
('noon', 'Noon'),
|
||||||
('evening', 'Evening'),
|
('evening', 'Evening'),
|
||||||
], "End of Vacation",
|
], "End of Vacation", track_visibility='onchange',
|
||||||
help="For example, if you leave one full calendar week, "
|
help="For example, if you leave one full calendar week, "
|
||||||
"the end of vacation is Friday Evening"),
|
"the end of vacation is Friday Evening"),
|
||||||
'number_of_days_remove': fields.function(
|
'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>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>
|
<li>End date : ${object.vacation_date_to or ''} ${object.vacation_time_to or ''}</li>
|
||||||
% endif
|
% 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>Leave type : ${object.holiday_status_id.name or ''}</li>
|
||||||
<li>Description : ${object.name or ''}</li>
|
<li>Description : ${object.name or ''}</li>
|
||||||
% if object.notes:
|
% if object.notes:
|
||||||
|
|||||||
@@ -37,6 +37,37 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</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">
|
<record id="edit_holiday_status_form" model="ir.ui.view">
|
||||||
<field name="name">hr_holidays_usability.hr.holidays.status.form</field>
|
<field name="name">hr_holidays_usability.hr.holidays.status.form</field>
|
||||||
<field name="model">hr.holidays.status</field>
|
<field name="model">hr.holidays.status</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user