Is there any way to call a wizard after creating an object in odoo11? or perhaps use some sort of after_create method?
I've tried this code but it doesn't seem to work
@api.model
def create(self, values):
a= super(MyModel, self).create(values)
self.open_wizard()
return a
def open_wizard(self):
return {
'name': 'my wizard',
'type': 'ir.actions.act_window',
'res_model': 'my.wizard',
'view_type': 'form',
'view_mode': 'form', 'target': 'new'}
You can call return only once
Yes, but the create method doesn't work without returning the created object