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

Hello, I am using odoo v14.

I'm trying to apply a dynamic domain to a view displayed by a menuitem.menuitem can only trigger window action, but window actions can't have dynamic domain.How can i user server action with menuitem please .for my domain i'm trying to access my current user( uid) attributes ( like name, company_id,..).

Thanks in advance  :)

アバター
破棄
最善の回答

I think, you should call custom method from your model, which will return nessesary view. In custom method you can get access to fields you need. For example:

          Leave Filter

         

          code

          action =  env.get('hr.holidays').leave_filter_act()

 

More info here: https://www.odoo.com/ru_RU/forum/pomoshch-1/how-to-call-ir-actions-act-window-from-python-to-menuitem-142855

See:  How To Call Python Function From Menu Item in Odoo

アバター
破棄
最善の回答

HI, You can follow the following link for server actions:

https://youtu.be/SMKry2-tRRI

Thanks

アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 23
2378
1
4月 23
3089
3
3月 22
9404
1
12月 21
4024
1
1月 20
4308