Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1396 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
nov 24
1549
1
apr 24
1951
3
giu 23
2385
1
set 21
9320
1
gen 24
16908