Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4399 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
mai 24
1673
1
mars 21
4287
0
mai 25
3795
2
févr. 23
4326
1
janv. 23
2338