Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][IMP] product_packaging_level: remove renaming hook #1857

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

trisdoan
Copy link
Contributor

This change

  • Module was renamed to product_packaging_level from 16.0

    • A hook is added to handle the smooth transition:
      def pre_init_hook(cr):
      if openupgrade.table_exists(cr, "product_packaging_type"):
      env = api.Environment(cr, SUPERUSER_ID, {})
      # Former version of the module is present
      models = [("product.packaging.type", "product.packaging.level")]
      openupgrade.rename_models(env.cr, models)
      fields = [
      (
      "product.packaging",
      "product_packaging",
      "packaging_type_id",
      "packaging_level_id",
      )
      ]
      openupgrade.rename_fields(env, fields, no_deep=True)
      modules = [("product_packaging_type", "product_packaging_level")]
      openupgrade.update_module_names(env.cr, modules, merge_modules=True)
    • The hook has been improved in [16.0][FIX] product_packaging_level: cannot input name with user_defined policy + update rename hook #1809
  • We believe we should not carry on this hook forever

    • Keeping this hook is unnecessary as openupgrade would have run it at the 16.0 step
    • the same as we don't keep migrations across versions

@trisdoan
Copy link
Contributor Author

Hello @rousseldenis , @ChrisOForgeFlow, do you agree with this?

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