Skip to Content
Menú
This question has been flagged
1 Respondre
4863 Vistes

I want to show popup message in odoo when a record is deleted from the view. How can I do it? Is it possible to show that message only when the record is deleted from the 'form view' and not from the 'tree view'?

Avatar
Descartar
Best Answer

Hi Ernesto:

You can inherit and extend the unlink function in the base Model class if you want this across the board. Here's a link to the code in the base class.

https://github.com/odoo/odoo/blob/13.0/odoo/models.py#L3299

If you want this to apply only to specific models, you'll need to extend this function in the classes of those models instead of the base Model class.

Regarding your second question, these changes will apply across the board i.e. form view, list view, import, api, custom code, etc.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de gen. 20
2982
2
de març 15
3990
1
d’oct. 22
1886
4
d’oct. 20
72807
6
de des. 19
17883