[FIX] hr: extend employee privacy protection to a few fields
A few fields present in the "Private Info" tab of the Employee form did not have the corresponding `groups` attribute. This could cause access rights problems.
This commit is contained in:
@@ -111,9 +111,10 @@ class Employee(models.Model):
|
|||||||
active = fields.Boolean('Active', related='resource_id.active', default=True, store=True)
|
active = fields.Boolean('Active', related='resource_id.active', default=True, store=True)
|
||||||
# private partner
|
# private partner
|
||||||
address_home_id = fields.Many2one(
|
address_home_id = fields.Many2one(
|
||||||
'res.partner', 'Private Address', help='Enter here the private address of the employee, not the one linked to your company.')
|
'res.partner', 'Private Address', help='Enter here the private address of the employee, not the one linked to your company.',
|
||||||
|
groups="hr.group_hr_user")
|
||||||
country_id = fields.Many2one(
|
country_id = fields.Many2one(
|
||||||
'res.country', 'Nationality (Country)')
|
'res.country', 'Nationality (Country)', groups="hr.group_hr_user")
|
||||||
gender = fields.Selection([
|
gender = fields.Selection([
|
||||||
('male', 'Male'),
|
('male', 'Male'),
|
||||||
('female', 'Female'),
|
('female', 'Female'),
|
||||||
@@ -135,9 +136,9 @@ class Employee(models.Model):
|
|||||||
domain="[('partner_id', '=', address_home_id)]",
|
domain="[('partner_id', '=', address_home_id)]",
|
||||||
groups="hr.group_hr_user",
|
groups="hr.group_hr_user",
|
||||||
help='Employee bank salary account')
|
help='Employee bank salary account')
|
||||||
permit_no = fields.Char('Work Permit No')
|
permit_no = fields.Char('Work Permit No', groups="hr.group_hr_user")
|
||||||
visa_no = fields.Char('Visa No')
|
visa_no = fields.Char('Visa No', groups="hr.group_hr_user")
|
||||||
visa_expire = fields.Date('Visa Expire Date')
|
visa_expire = fields.Date('Visa Expire Date', groups="hr.group_hr_user")
|
||||||
|
|
||||||
# image: all image fields are base64 encoded and PIL-supported
|
# image: all image fields are base64 encoded and PIL-supported
|
||||||
image = fields.Binary(
|
image = fields.Binary(
|
||||||
|
|||||||
Reference in New Issue
Block a user