Skip to content

[IMP] hr: moved permit_no & expiration to parent class hr_version - #5220

Open
sdemeesterde wants to merge 1 commit into
master-hr-onboarding-samdefrom
master-hr-onboarding-task_make_permit_no_versioned-samde
Open

[IMP] hr: moved permit_no & expiration to parent class hr_version#5220
sdemeesterde wants to merge 1 commit into
master-hr-onboarding-samdefrom
master-hr-onboarding-task_make_permit_no_versioned-samde

Conversation

@sdemeesterde

Copy link
Copy Markdown

The work permit number of an employee was not versioned, making it impossible to store 2 different values (in case of a renewal).

Solution: Move the permit_no field to parent class hr_version, along with linked field work_permit_expiration_date.

Task: 6446323

@robodoo

robodoo commented Aug 5, 2026

Copy link
Copy Markdown

This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-samde, it needs to be retargeted before it can be merged.

@SaraBriki SaraBriki left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🙂 ! I left a few comments for you to check.

Comment thread addons/hr/models/hr_employee.py
Comment thread addons/hr/models/hr_employee.py
Comment thread addons/hr/models/hr_employee.py Outdated
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")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the rest of the work permit fields 🤔

(If the Binary one causes issues, just leave it as is)

The work permit number of an employee was not versioned, making it impossible to store 2 different values (in case of a renewal).

Solution: Move the permit_no field to parent class hr_version, along with linked field work_permit_expiration_date,
and the linked computed field work_permit_name.

Task: 6446323
@sdemeesterde
sdemeesterde force-pushed the master-hr-onboarding-task_make_permit_no_versioned-samde branch from e2c7a2a to 38a8ce4 Compare August 6, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants