Skip to content
Snippets Groups Projects
Commit 50319a83 authored by Yannick Tivisse's avatar Yannick Tivisse Committed by Enric Tobella
Browse files

[FIX] hr_contract: Fix multi-company issue on api.constrains


Purpose
=======

Avoid mismatch between contracts from different companies and clarify
error message.

closes odoo/odoo#75553

closes odoo/odoo#120650

Related: odoo/enterprise#19647
Related: odoo/upgrade#2777
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 92cd7d08
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,7 @@ class Contract(models.Model):
domain = [
('id', '!=', contract.id),
('employee_id', '=', contract.employee_id.id),
('company_id', '=', contract.company_id.id),
'|',
('state', 'in', ['open', 'close']),
'&',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment