From 37a64c5c261027989b52a39d464ea2b3173b6fd0 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Thu, 8 Dec 2022 11:30:42 +0100 Subject: [PATCH] remove preinithook --- beesdoo_product_label/__init__.py | 1 - beesdoo_product_label/__manifest__.py | 1 - beesdoo_product_label/rename_model.py | 9 --------- 3 files changed, 11 deletions(-) delete mode 100644 beesdoo_product_label/rename_model.py diff --git a/beesdoo_product_label/__init__.py b/beesdoo_product_label/__init__.py index ce76ad59d..0650744f6 100644 --- a/beesdoo_product_label/__init__.py +++ b/beesdoo_product_label/__init__.py @@ -1,2 +1 @@ from . import models -from .rename_model import rename_model diff --git a/beesdoo_product_label/__manifest__.py b/beesdoo_product_label/__manifest__.py index 9b80797d4..98fc5d302 100644 --- a/beesdoo_product_label/__manifest__.py +++ b/beesdoo_product_label/__manifest__.py @@ -31,5 +31,4 @@ ], "installable": True, "license": "AGPL-3", - "pre_init_hook": "rename_model", } diff --git a/beesdoo_product_label/rename_model.py b/beesdoo_product_label/rename_model.py deleted file mode 100644 index 06aba31d9..000000000 --- a/beesdoo_product_label/rename_model.py +++ /dev/null @@ -1,9 +0,0 @@ -from openupgradelib import openupgrade - - -def rename_model(cr): - if not openupgrade.table_exists( - cr, "beesdoo_product_label" - ) and openupgrade.table_exists(cr, "product_label"): - openupgrade.rename_tables(cr, [("product_label", "beesdoo_product_label")]) - openupgrade.rename_models(cr, [("product.label", "beesdoo.product.label")])