From 6c7cf5ac3069204e96757f42bff3fb843b561415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 25 Sep 2024 16:18:55 +0200 Subject: [PATCH] [OU-FIX] hr_expense: fail when account_journal_lock_date --- .../scripts/hr_expense/15.0.2.0/post-migration.py | 4 ++++ 1 file changed, 4 insertions(+) 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(