İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
4898 Görünümler

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
Vazgeç

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

Did you find the solution for this?

Üretici En İyi Yanıt

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ara 22
3347
What is wizard ? Çözüldü
3
Kas 23
32354
2
Ara 23
17698
6
Nis 18
21379
5
Ara 23
18252