Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5740 Zobrazení

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
Zrušit
Nejlepší odpověď

Try,

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


Kind regards.


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
6
úno 24
11978
5
čvc 20
10666
1
lis 16
14642
2
říj 15
10734
1
srp 24
6649