Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Refresh a page when delete is performed?

By
Uppili Arivukkannu
on 6/20/16, 7:31 AM 420 views

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.

0
Juan Vicente Pascual
On 6/22/16, 9:32 AM

Try,

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


Kind regards.


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/20/16, 7:31 AM
Seen: 420 times
Last updated: 6/22/16, 9:32 AM