Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1511 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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​

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lis 24
1671
1
kwi 24
2086
3
cze 23
2481
1
wrz 21
9449
1
sty 24
17062