Skip to content

[IMP] hr: Support versioning of work permit no - #5236

Open
amgom-odoo wants to merge 1 commit into
master-hr-onboarding-amgomfrom
master-hr-work-permit-versioning-amgom
Open

[IMP] hr: Support versioning of work permit no#5236
amgom-odoo wants to merge 1 commit into
master-hr-onboarding-amgomfrom
master-hr-work-permit-versioning-amgom

Conversation

@amgom-odoo

Copy link
Copy Markdown

Support versioning of work permit no by adding the field in the hr_version table

Add upgrade script for the module update and corresponding upgrade test case

Task: 6452365

@robodoo

robodoo commented Aug 10, 2026

Copy link
Copy Markdown

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

Comment thread addons/hr/__manifest__.py
{
'name': 'Employees',
'version': '1.1',
'version': '1.2',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why the version change here ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Aren't we supposed to increase the version to trigger the upgrade migration script.

Upgrade scripts are automatically executed by Odoo when upgrading a module if its version number has been bumped.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No, the version number not changed, you need to check the module version and use it on the upgrade script not the vice,
you supposed to use 1,1 version and update the upgrade script

@usseif97 usseif97 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.

Thanks for your work,
You've successfully moved the permit number to the version model, but you also need to move the other related fields and methods to the version model.
Take a look for the related and move them also

Support versioning of work permit no by adding the field in the hr_version table

Add upgrade script for the module update and corresponding upgrade test case

Task: 6452365
@amgom-odoo
amgom-odoo force-pushed the master-hr-work-permit-versioning-amgom branch from 118f16c to 3007eda Compare August 11, 2026 19:00

@usseif97 usseif97 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.

Just update the module version and the upgrade script

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