Odoo Help


Wizard didn't refresh main page in Odoo v8 or new API

Andre Leander
on 9/30/14, 5:05 AM 2,743 views

I have developed a wizard in my new module. In OpenERP v7 the wizard will refresh the main form after it closed. 

I used return {'type': 'ir.actions.act_window_close'} to close the wizard. But in Odoo v8, it do not refresh. I have read some forum with same problem and they used return {'type': 'ir.actions.client', 'tag': 'reload' } to reload page. But it make the process heavy and need extra time. Any solution or advice for this problem ? Thank you for your best help.

If by main form you mean the one in your home page, have you tried: {'type': 'ir.actions.client', 'tag': 'home' }?

Pau Ubach
on 10/14/14, 2:40 AM

No.. I mean main form is the current form :D.. I have gotten the answer. I will post below.. Thank u Pau.

Andre Leander
on 10/19/14, 9:39 PM
Andre Leander
On 10/19/14, 9:47 PM

I have got the anwer with these steps:

  1. Create a new javascript file in static>src>js.
  2. Copy code below: 

openerp.yout_module = function (instance) {
    instance.web.ActionManager = instance.web.ActionManager.extend({
        ir_actions_act_close_wizard_and_reload_view: function (action, options) {
            if (!this.dialog) {
            return $.when();

3. Link your js file to your module with file your_module_name.xml in views folder.

<?xml version="1.0" encoding="UTF-8"?>
        <template id="assets_backend" name="your_module_name assets" inherit_id="web.assets_backend">
        <xpath expr="." position="inside">
            <script type="text/javascript" src="/your_module_name/static/src/js/your_js_file_name.js"></script>

4. Add your your_module_name.xml to __openerp__.py file


About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/30/14, 5:05 AM
Seen: 2743 times
Last updated: 3/16/15, 8:10 AM