You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
744 B

7 years ago
7 years ago
7 years ago
7 years ago
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 LasLabs Inc.
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
  4. from openerp import SUPERUSER_ID, api
  5. from .models.module import PARAM_INSTALLED_CHECKSUMS
  6. from .models.module_deprecated import PARAM_DEPRECATED
  7. def uninstall_hook(cr, registry):
  8. env = api.Environment(cr, SUPERUSER_ID, {})
  9. env["ir.config_parameter"].set_param(PARAM_INSTALLED_CHECKSUMS, False)
  10. # TODO Remove from here when removing deprecated features
  11. env["ir.config_parameter"].set_param(PARAM_DEPRECATED, False)
  12. prefix = "module_auto_update.field_ir_module_module_checksum_%s"
  13. fields = env.ref(prefix % "dir") | env.ref(prefix % "installed")
  14. fields.with_context(_force_unlink=True).unlink()