Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
4812 Vistas

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 Mejor respuesta

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

Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
dic 22
3236
3
nov 23
32086
2
dic 23
17567
6
abr 18
21231
5
dic 23
18154