[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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user