|
|
@ -14,11 +14,18 @@ class WizardModelMenuCreate(models.TransientModel): |
|
|
|
self.ensure_one() |
|
|
|
active_id = self._context.get('active_id') |
|
|
|
bve_view = self.env['bve.view'].browse(active_id) |
|
|
|
self.env['ir.ui.menu'].create({ |
|
|
|
menu = self.env['ir.ui.menu'].create({ |
|
|
|
'name': self.name, |
|
|
|
'parent_id': self.menu_id.id, |
|
|
|
'action': 'ir.actions.act_window,%d' % (bve_view.action_id,) |
|
|
|
}) |
|
|
|
self.env['ir.model.data'].create({ |
|
|
|
'name': bve_view.name + ', id=' + str(menu.id), |
|
|
|
'noupdate': True, |
|
|
|
'module': 'bi_view_editor', |
|
|
|
'model': 'ir.ui.menu', |
|
|
|
'res_id': menu.id, |
|
|
|
}) |
|
|
|
return {'type': 'ir.actions.client', 'tag': 'reload'} |
|
|
|
return super(WizardModelMenuCreate, self).menu_create() |
|
|
|
|
|
|
|