forked from OCA/server-tools
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhooks.py
More file actions
20 lines (14 loc) · 704 Bytes
/
hooks.py
File metadata and controls
20 lines (14 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from openerp import SUPERUSER_ID, api
from .models.module import PARAM_INSTALLED_CHECKSUMS
from .models.module_deprecated import PARAM_DEPRECATED
def install_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
# make sure migration to 9 does not enable deprecated features
env["ir.config_parameter"].set_param(PARAM_DEPRECATED, '0')
def uninstall_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env["ir.config_parameter"].set_param(PARAM_INSTALLED_CHECKSUMS, False)
env["ir.config_parameter"].set_param(PARAM_DEPRECATED, False)