Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
4 Besvarelser
5131 Visninger

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
Kassér

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

Did you find the solution for this?

Forfatter Bedste svar

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

Avatar
Kassér
Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
dec. 22
3640
3
nov. 23
33129
2
dec. 23
17975
6
apr. 18
21699
5
dec. 23
18531