Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
4968 Visualizzazioni

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

Avatar
Abbandona

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

Did you find the solution for this?

Autore Risposta migliore

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

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 22
3452
3
nov 23
32690
2
dic 23
17802
6
apr 18
21522
5
dic 23
18357