Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
4918 Представления

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
3387
What is wizard ? Решено
3
нояб. 23
32459
2
дек. 23
17734
6
апр. 18
21414
5
дек. 23
18268