İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4300 Görünümler

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?

Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 24
1586
1
Mar 21
4089
0
May 25
3708
2
Şub 23
4223
1
Oca 23
2207