İçereği Atla
Menü
This question has been flagged
1 Cevapla
1157 Görünümler

hi. 

im looking for a method that runs when a form opens and can be overriden in odoo 16 to run custom code before the form opens.

i want to run custom code when crm pipeline opens.

hope someone can help

Avatar
Vazgeç
Best Answer

Hi,

You can use the '_get_view' method in the crm_lead model.

@api.model
   def _get_view(self, view_id=None, view_type='form', **options):
       arch, view = super()._get_view(view_id, view_type, **options)
       custom code here
       return arch, view


Hope it helps​

Avatar
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
1
Kas 24
1094
1
Nis 24
1520
3
Haz 23
2066
1
Eyl 21
8971
1
Oca 24
16610