Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
4 Respostas
4964 Visualizações

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
Cancelar

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

Did you find the solution for this?

Autor Melhor resposta

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

Avatar
Cancelar
Melhor resposta

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

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
dez. 22
3445
3
nov. 23
32662
2
dez. 23
17782
6
abr. 18
21510
5
dez. 23
18351