Skip to Content
Menu
This question has been flagged
4 Replies
5029 Rodiniai

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

Portretas
Atmesti

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

Did you find the solution for this?

Autorius Best Answer

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 22
3483
3
lapkr. 23
32846
2
gruod. 23
17842
6
bal. 18
21564
5
gruod. 23
18399