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
444 B

8 years ago
8 years ago
8 years ago
8 years ago
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2004-today Odoo SA (<http://www.odoo.com>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import models, api
  5. class IrUiView(models.Model):
  6. _inherit = 'ir.ui.menu'
  7. @api.multi
  8. def unlink(self):
  9. res = super(IrUiView, self).unlink()
  10. shortcuts = self.env['web.shortcut'].search([('menu_id', '=', False)])
  11. shortcuts.unlink()
  12. return res