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.

14 lines
370 B

8 years ago
8 years ago
  1. # -*- coding: utf-8 -*-
  2. from openerp import models, fields, api
  3. class IrUiView(models.Model):
  4. _inherit = 'ir.ui.menu'
  5. @api.multi
  6. def unlink(self):
  7. res = super(IrUiView, self).unlink()
  8. shortcuts = self.env['web.shortcut'].search([('menu_id', '=', False)])
  9. for shortcut in shortcuts:
  10. shortcut.unlink()
  11. return res