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>
11 lines
250 B
Python
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)
|