Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
5011 มุมมอง

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'}

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 22
3475
What is wizard ? แก้ไขแล้ว
3
พ.ย. 23
32816
2
ธ.ค. 23
17832
populate wizard form dynamically แก้ไขแล้ว
6
เม.ย. 18
21556
How To call wizard from python in odoo10 แก้ไขแล้ว
5
ธ.ค. 23
18390