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.
 
 
 
 

16 lines
487 B

# Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib.openupgrade import migrate
@migrate()
def migrate(env, version):
module_ids = env['ir.module.module'].search([
('name', '=', 'base_tier_validation_formula'),
('state', '=', 'uninstalled')
])
if module_ids:
module_ids.sudo().button_install()
cr = env.cr
cr.execute("UPDATE tier_definition SET definition_type = 'formula'")