[FIX] hr_employee: company_id required

On the dashboard of Time Off (calendar view), the banner displaying
the remaining leaves is not shown as _get_contextual_employee_id
of hr_leave_type.py is returning False due to the missing required
on the company_id of hr.employee.

A fix was made in 2bd5e9a but missing the part that the employee_id
is not required. Confirmed by YTI

close opw-2252479

closes odoo/odoo#53109

Related: odoo/upgrade#1596
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Baptiste Vergote
2020-08-12 10:36:50 +00:00
parent 084567e347
commit 8de815e8fc
+1
View File
@@ -36,6 +36,7 @@ class HrEmployeePrivate(models.Model):
user_id = fields.Many2one('res.users', 'User', related='resource_id.user_id', store=True, readonly=False)
user_partner_id = fields.Many2one(related='user_id.partner_id', related_sudo=False, string="User's partner")
active = fields.Boolean('Active', related='resource_id.active', default=True, store=True, readonly=False)
company_id = fields.Many2one('res.company',required=True)
# private partner
address_home_id = fields.Many2one(
'res.partner', 'Address', help='Enter here the private address of the employee, not the one linked to your company.',