diff --git a/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py b/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py index 2045ea444c71..fca3d1c4832b 100644 --- a/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py +++ b/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py @@ -48,6 +48,10 @@ def _fill_payment_state(env): @openupgrade.migrate() def migrate(env, version): + if openupgrade.is_module_installed( + env.cr, "account_journal_lock_date", + ): + env = env.with_context(bypass_journal_lock_date=True) _fill_payment_state(env) openupgrade.load_data(env.cr, "hr_expense", "15.0.2.0/noupdate_changes.xml") openupgrade.delete_record_translations(