Files
odoo_source/addons/hr/models/resource.py
T
Swapnesh Shah 7c8ae751f8 [FIX] hr: allow to copy employee linked to user
Before this commit, It was not possible to copy An employee which is already linked to User due `user_uniq` constraints.

Now we add `copy=False` on `user_id` field, so Employee will be copied without linked User.

closes odoo/odoo#49915

X-original-commit: 2a63df03859166414be338c6655ee8c4052666b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22 07:28:29 +00:00

11 lines
250 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResourceResource(models.Model):
_inherit = "resource.resource"
user_id = fields.Many2one(copy=False)