تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
4956 أدوات العرض

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
ديسمبر 22
3430
What is wizard ? تم الحل
3
نوفمبر 23
32621
2
ديسمبر 23
17769
6
أبريل 18
21504
5
ديسمبر 23
18344