Files
odoo_source/addons/hr_contract/models/res_users.py
T
Yannick Tivisse 9edc477b31 [IMP] hr_contract: Add a access right group on contracts
Some private information are on the contracts. Add a special group to display the
contracts, independant of the other HR access rights.
2018-05-04 09:47:00 +02:00

14 lines
481 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResUsers(models.Model):
_inherit = 'res.users'
group_hr_contract_user = fields.Selection(
selection=lambda self: self._get_group_selection('base.module_category_hr_contract'),
string='Contracts', compute='_compute_groups_id', inverse='_inverse_groups_id',
category_xml_id='base.module_category_hr_contract')