Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
6812 Ansichten

Hi everybody,


I need to open a wizard after clicking on a button AND several processes.

Eg: "my_button" -> "my_button_function" -> "another_function_to_open_wizard"

But each time I try to create a wizard by this way, nothing show up. If I put the python code to open the wizard in the first function (the one directly depending on the button), it works. But if the code for the wizard is in a separated function, there is nothing...

The problem is, I need to have separated functions, I can't do it in another way, so why the wizard doesn't show up, and how to make it work properly ?

I precise, the code is correctly executed, and it goes in the wizard function, but just return anything...


Thanks by advance

Avatar
Verwerfen
Autor

Something like that Benoit Vézina, I did this : return {

'name': _('Send order request'),

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

'view_type': 'form',

'view_mode': 'form',

'res_model': 'purchase.order.alt',

'views': [(view.id, 'form')],

'view_id': view.id,

'nodestroy': True,

'target': 'new',

'res_id': wiz.id,

'context': self.env.context,

}

Beste Antwort

did you try to return an action at the end like

<code>

return {
            'name':_("Products to Process"),
            'view_mode': 'form',
            'view_id': False,
            'view_type': 'form',
            'res_model': 'stock.partial.move',
            'res_id': partial_id,
            'type': 'ir.actions.act_window',
            'nodestroy': True,
            'target': 'new',
            'domain': '[]',
            'context': context
        }

</code>

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Okt. 23
1691
4
Okt. 18
8471
3
Juni 18
7004
2
Dez. 21
26347
1
Dez. 19
3592