Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odgovori
4915 Prikazi

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
Opusti

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

Did you find the solution for this?

Avtor Best Answer

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

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
dec. 22
3384
3
nov. 23
32443
2
dec. 23
17733
6
apr. 18
21410
5
dec. 23
18266