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

I want to open pop up(wizard) by select specify item from selection 

but the @onchange function can't return 

The example:

@api.onchange('m')

    def _onchange_m(self):

             return {

                'type': 'ir.actions.act_window',

                'name': _('Reporting'),

                'res_model': 'hr.m',

                'view_type': 'form',

                'view_mode': 'form',

                'target': 'new',

            }

Someone have an idea how to do it?

アバター
破棄
最善の回答

The onchange method is meant to only populate other fields on the form when a value changes. To return a pop up you could use @api.constrains, which will run on record save, or put in additional logic on an existing method to return your pop up.

アバター
破棄
関連投稿 返信 ビュー 活動
2
5月 24
1659
1
3月 21
4281
0
5月 25
3780
2
2月 23
4309
1
1月 23
2293