Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5746 Weergaven

I want to refresh the view page when delete is performed.

I tried unlink() method I see some codes to reload the page.

return { 'type': 'ir.actions.client', 'tag': 'reload', } 

But when I use unlink() method

@api.multi

def unlink(self):


    return models.Model.unlink(self)

It has to return the unlink() to delete the record so I can not call the return for reload.

I tried this

@api.multi

def unlink(self):

    x={

        'type': 'ir.actions.client',

        'type': 'reload',}

    return models.Model.unlink(self),x

But its not working.

Any other suggestions to reload/refresh the view page of odoo when delete is performed.


Thanks.

Avatar
Annuleer
Beste antwoord

Try,

@api.multi
def unlink(self):
res = super(YOURCLASS, self).unlink()
return { 'type': 'ir.actions.client', 'tag': 'reload', }


Kind regards.


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
6
feb. 24
11988
5
jul. 20
10667
1
nov. 16
14645
2
okt. 15
10734
1
aug. 24
6662