diff --git a/addons/hr/models/hr_contract_type.py b/addons/hr/models/hr_contract_type.py index 04ff0d9e519..03aadc6f134 100644 --- a/addons/hr/models/hr_contract_type.py +++ b/addons/hr/models/hr_contract_type.py @@ -11,3 +11,4 @@ class ContractType(models.Model): name = fields.Char(required=True, translate=True) sequence = fields.Integer() + country_id = fields.Many2one('res.country') diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index f9fccadd833..3238b7d7f12 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -86,5 +86,11 @@ [(1, '=', 1)] + + + HR Contract Type: Multi Company + + ['|', ('country_id', '=', False), ('country_id', 'in', user.env.companies.mapped('country_id').ids)] + diff --git a/addons/hr/views/hr_contract_type_views.xml b/addons/hr/views/hr_contract_type_views.xml index 806c661d63f..ccfc0caca1a 100644 --- a/addons/hr/views/hr_contract_type_views.xml +++ b/addons/hr/views/hr_contract_type_views.xml @@ -7,6 +7,7 @@ + @@ -17,7 +18,8 @@
- + +