コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1116 ビュー

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

アバター
破棄
最善の回答

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​

アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 24
1015
1
4月 24
1449
3
6月 23
2018
1
9月 21
8860
1
1月 24
16516