[FIX] hr_holidays: show widget when no department

The `leave_stats` widget would crash if there was no department attached
to the employee/leave request.

closes odoo/odoo#100775

Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Kevin Baptiste
2022-09-22 08:46:50 +02:00
parent afdecd5ab1
commit 7abce800cb
@@ -40,7 +40,7 @@ export class LeaveStatsComponent extends Component {
}
get department() {
return this.props.record.data.department_id.data;
return this.props.record.data.department_id && this.props.record.data.department_id.data;
}
get employee() {