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.

21 lines
579 B

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 odoo import api, models
  5. class ModuleUpgrade(models.TransientModel):
  6. _inherit = 'base.module.upgrade'
  7. @api.multi
  8. def upgrade_module_cancel(self):
  9. return super(
  10. ModuleUpgrade,
  11. self.with_context(retain_checksum_installed=True),
  12. ).upgrade_module_cancel()
  13. @api.multi
  14. def upgrade_module(self):
  15. self.env['ir.module.module'].update_list()
  16. super(ModuleUpgrade, self).upgrade_module()