Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/hr/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,8 @@ def _lang_get(self):
}
"""

permit_no = fields.Char('Work Permit No', groups="hr.group_hr_user", tracking=True)
visa_no = fields.Char('Visa No', groups="hr.group_hr_user", tracking=True)
visa_expire = fields.Date('Visa Expiration Date', groups="hr.group_hr_user", tracking=True)
work_permit_expiration_date = fields.Date('Work Permit Expiration Date', groups="hr.group_hr_user", tracking=True)
has_work_permit = fields.Binary(string="Work Permit", groups="hr.group_hr_user")
work_permit_scheduled_activity = fields.Boolean(default=False, groups="hr.group_hr_user")
work_permit_name = fields.Char('work_permit_name', compute='_compute_work_permit_name', groups="hr.group_hr_user")
Expand All @@ -238,6 +236,8 @@ def _lang_get(self):
("other", "Other")], compute="_compute_work_location_type", tracking=True)

# All version fields needing a specific group to be accessible should also have `inherited=True` set on its definition to make sure those fields are linked to `_inherits` on `hr.version`
permit_no = fields.Char(readonly=False, groups="hr.group_hr_user", related="version_id.permit_no", inherited=True)
work_permit_expiration_date = fields.Date(readonly=False, groups="hr.group_hr_user", related="version_id.work_permit_expiration_date", inherited=True)
first_contract_date = fields.Date(compute='_compute_first_contract_date', groups="hr.group_hr_manager", store=True,
help="The date of the first contract of the employee in the company.")
contract_date_start = fields.Date(readonly=False, related="version_id.contract_date_start", inherited=True, groups="hr.group_hr_manager")
Expand Down
6 changes: 6 additions & 0 deletions addons/hr/models/hr_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ def _get_hr_responsible_domain(self):
('female', 'Female'),
('other', 'Other'),
], groups="hr.group_hr_user", tracking=1, help="This is the legal sex as recognized by the state, used for official and statutory purposes.")
permit_no = fields.Char("Work Permit No", groups="hr.group_hr_user", tracking=True)
work_permit_expiration_date = fields.Date(
"Work Permit Expiration Date",
groups="hr.group_hr_user",
tracking=True,
)

private_street = fields.Char(string="Private Street", groups="hr.group_hr_user", tracking=1)
private_street2 = fields.Char(string="Private Street2", groups="hr.group_hr_user", tracking=1)
Expand Down