Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
4875 Zobrazení

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
Zrušit

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

Did you find the solution for this?

Autor Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 22
3329
3
lis 23
32267
2
pro 23
17659
6
dub 18
21334
5
pro 23
18219