Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
4894 Widoki

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

Awatar
Odrzuć

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

Did you find the solution for this?

Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
gru 22
3339
What is wizard ? Rozwiązane
3
lis 23
32325
2
gru 23
17677
6
kwi 18
21366
5
gru 23
18236