コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
4967 ビュー

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
3450
3
11月 23
32687
2
12月 23
17801
6
4月 18
21522
5
12月 23
18356