I would like to display a warning at the end of the action I return like this
...some code...
return {
'view_type': 'form',
'view_mode': 'form',
'view_id': self.env.ref('my_module.my_view').id,
'res_model': 'my.model',
'type': 'ir.actions.act_window',
'target': 'new',
'context': {}
}
I tried adding the key warning to the return values but it only completed the act_window without raising any warning:
return {
'view_type': 'form',
'view_mode': 'form',
'view_id': self.env.ref('my_module.my_view').id,
'res_model': 'my.model',
'type': 'ir.actions.act_window',
'target': 'new',
'context': {},
'warning': 'My warning',
}
I also tried adding the warning key to the context but it didn't work either.
The goal is to simply display an informative warning after the page is loaded.