Skip to Content
Menú
This question has been flagged
4 Respostes
4815 Vistes

Hello,

I use odoo 8, i have a wizard and a product_id filed in this wizard, i want to to close wizard on onchange function for product_id field.

Thanks

Avatar
Descartar

return {'type': 'ir.actions.act_window_close'} this actually closes the wizard

Did you find the solution for this?

Autor Best Answer

Thansk, but it only work when you click on a button but not with onchange on a filed

Avatar
Descartar
Best Answer

@api.onchange('product_id')
def onchange_product_id(self):
    if self.product_id:
        return {'type': 'ir.actions.act_window_close'}

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de des. 22
3241
3
de nov. 23
32089
2
de des. 23
17569
6
d’abr. 18
21239
5
de des. 23
18159