Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
1561 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
nov. 24
1704
1
avr. 24
2150
3
juin 23
2512
1
sept. 21
9505
1
janv. 24
17086