Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
4410 Visninger

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
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
maj 24
1677
1
mar. 21
4294
0
maj 25
3801
2
feb. 23
4329
1
jan. 23
2353