[IMP] hr_holidays: hide duplicated info on popover
The name of the employee and the dates were shown multiple times in the popover. This commit aims at showing the relevant information only once. closes odoo/odoo#49845 Taskid: 2227158 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Yannick Tivisse
parent
bad0e501c0
commit
1b4767ee79
@@ -16,7 +16,7 @@
|
||||
<field name="name">hr.leave.report.calendar.view</field>
|
||||
<field name="model">hr.leave.report.calendar</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Time Off" date_start="start_datetime" date_stop="stop_datetime" mode="month" quick_add="False" color="employee_id" event_open_popup="True">
|
||||
<calendar string="Time Off" date_start="start_datetime" date_stop="stop_datetime" mode="month" quick_add="False" color="employee_id" event_open_popup="True" js_class="time_off_calendar_all">
|
||||
<field name="name"/>
|
||||
</calendar>
|
||||
</field>
|
||||
|
||||
@@ -19,8 +19,14 @@ odoo.define('hr_holidays.dashboard.view_custo', function(require) {
|
||||
const state = this.event.extendedProps.record.state;
|
||||
this.canDelete = state && ['validate', 'refuse'].indexOf(state) === -1;
|
||||
this.canEdit = state !== undefined;
|
||||
this.display_name = this.event.extendedProps.record.display_name;
|
||||
this.displayFields = [];
|
||||
|
||||
if (this.modelName === "hr.leave.report.calendar") {
|
||||
const duration = this.event.extendedProps.record.display_name.split(':').slice(-1);
|
||||
this.display_name = _.str.sprintf(_t("Time Off : %s"), duration);
|
||||
} else {
|
||||
this.display_name = this.event.extendedProps.record.display_name;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user