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

Reload kanban view after a wizards closes

By
angel lacret
on 6/9/15, 9:06 AM 712 views

I am trying to execute an action after a wizard action is performed, i want to reload a kanban:

Python code:

return {'type': 'ir.actions.act_close_wizard_and_reload_view', } 

Javascript code: (taken from the forum, i think for version 7)

openerp.bmwe_crm = function(instance, local) {
        instance.web.ActionManager = instance.web.ActionManager.extend({
                    ir_actions_act_close_wizard_and_reload_view: function (action, options) { 
                            if (!this.dialog) {
                                    options.on_close();
                            }
                            this.dialog_stop();
                            this.inner_widget.views[this.inner_widget.active_view].controller.reload();
                            return $.when();
                }
        });
}
 

All this from a forum about 7.0 version, but i am using 8.0 and it does not seems to work. I've even trying executing a default action:

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

Does not reload the page neither

0
sarkar
On 4/6/16, 9:16 AM

Hello

please try this 

in wizard

return on your method

# your method 

return self.return_action()

def return_action(self):

model_obj = self.env['ir.model.data']

data_id = model_obj._get_id('module', 'knaban view id')

view_id = model_obj.browse(data_id).res_id

return {

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

'tag': 'reload',

'name': _('Locker'),

'res_model': 'your model',

'view_type': 'kanban',

'view_mode': 'kanban',

'view_id': view_id,

'target': 'current',

'nodestroy': True,

}

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/9/15, 9:06 AM
Seen: 712 times
Last updated: 4/6/16, 9:16 AM