Skip to content

[OU-FIX] hr: backfill NULL audit dates before hr.version fill#47

Open
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-hr-null-write-date
Open

[OU-FIX] hr: backfill NULL audit dates before hr.version fill#47
dnplkndll wants to merge 1 commit into
19.0from
19.0-fix-hr-null-write-date

Conversation

@dnplkndll

@dnplkndll dnplkndll commented May 29, 2026

Copy link
Copy Markdown

Port slimmed to the genuine delta on top of upstream's now-landed hr/19.0.1.1 migration (reconciliation vs OCA/19.0).

Upstream's post-migration.py fill of hr.version sources create_date/write_date from hr_employee into hr_version.date_version (NOT NULL). Raw-SQL-imported employees / renamed hr_contract rows can carry NULL audit dates, which then abort the migration (org-chart crash). This adds a pre-migration COALESCE(..., write_date, TIMESTAMP '2000-01-01') backfill so those NULLs are filled before the version fill reads them.

Dropped from the earlier version of this branch (now redundant/out-of-scope):

  • the base hr_contracthr.version rename + field/xmlid work — identical upstream, so removed.
  • the stale post-migration.py edit — upstream's newer fill supersedes it.
  • orphan-view/field cleanup — that's database_cleanup's job, not a migration script.

@dnplkndll
dnplkndll force-pushed the 19.0-fix-hr-null-write-date branch 3 times, most recently from 0a317d6 to 174479b Compare May 30, 2026 03:17
@dnplkndll dnplkndll changed the title [OU-IMP] hr: backfill NULL audit dates on hr_employee [19.0][FIX] hr: backfill NULL audit dates + cleanup obsolete hr_contract fields/views May 30, 2026
@dnplkndll
dnplkndll force-pushed the 19.0-fix-hr-null-write-date branch 7 times, most recently from 1e49dab to 6372576 Compare June 5, 2026 19:53
@dnplkndll
dnplkndll force-pushed the 19.0-fix-hr-null-write-date branch 4 times, most recently from 25262f0 to af58cd7 Compare June 19, 2026 11:58
Raw-SQL-imported hr_employee / renamed hr_contract rows can carry NULL
create_date/write_date. The post-migration hr.version fill sources those
dates into hr_version.date_version (NOT NULL), so NULLs abort the migration
(org-chart crash). Backfill them in pre-migration first.

Co-authored-by: Hunki Enterprises BV <info@hunki-enterprises.com>
@dnplkndll
dnplkndll force-pushed the 19.0-fix-hr-null-write-date branch from af58cd7 to 2abaeb2 Compare July 16, 2026 20:38
@dnplkndll dnplkndll changed the title [19.0][FIX] hr: backfill NULL audit dates + cleanup obsolete hr_contract fields/views [OU-FIX] hr: backfill NULL audit dates before hr.version fill Jul 16, 2026
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.

1 participant