Currently, when creating `resource.calendar.leaves` for a `hr.leave` it creates one in the employee's calendar and one in the contract's calendar if it's different. But if both calendar are the same, it does not associate the benefit type to the resource leave. This commit fixes the issue and add unit tests for this use case. closes odoo/odoo#31288