Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
4906 Vizualizări

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

Imagine profil
Abandonează

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

Did you find the solution for this?

Autor Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
dec. 22
3376
3
nov. 23
32422
2
dec. 23
17723
6
apr. 18
21396
5
dec. 23
18262