From bb3a42a14ffb913258a103ab49a94a0c8040c293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=BBurawski?= Date: Thu, 1 Sep 2022 10:12:03 +0200 Subject: [PATCH] [FIX] fix odobot_state field not find in parent view --- .../scripts/hr/14.0.1.1/pre-migrate.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 openupgrade_scripts/scripts/hr/14.0.1.1/pre-migrate.py diff --git a/openupgrade_scripts/scripts/hr/14.0.1.1/pre-migrate.py b/openupgrade_scripts/scripts/hr/14.0.1.1/pre-migrate.py new file mode 100644 index 000000000000..f5a141efb0a9 --- /dev/null +++ b/openupgrade_scripts/scripts/hr/14.0.1.1/pre-migrate.py @@ -0,0 +1,29 @@ +# Copyright 2022 Marcin Żurawski +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.logged_query( + env.cr, + """ + DELETE FROM ir_ui_view + WHERE inherit_id=( + SELECT res_id + FROM ir_model_data + WHERE name='res_users_view_form_profile' AND module='hr' + ); + """ + ) + openupgrade.logged_query( + env.cr, + """ + DELETE FROM ir_ui_view + WHERE id=( + SELECT res_id + FROM ir_model_data + WHERE name='res_users_view_form_profile' AND module='hr' + ); + """ + )