跳至内容
菜单
此问题已终结
4 回复
4909 查看

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

形象
丢弃

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

Did you find the solution for this?

编写者 最佳答案

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

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
12月 22
3380
3
11月 23
32432
2
12月 23
17727
6
4月 18
21403
5
12月 23
18263