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

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