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

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