Odoo Help

3
8 Answers
2
Petar Najman
12/22/13, 5:53 AM

Hi Jasad,

As far as I know there is no such functionality in the framework at the moment. However, you can try with the following ActionManager extension which should be defined in the JS file within your module

Here for example: 'static/src/js/your_module_name.js'

openerp.your_module_name = function (instance) {
    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();
        },
    });
}

To use this action just return following when closing a wizard:

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

I hope this helps :-)

Cheers, Petar

2 Comments
Subhin P V
1/20/14, 5:28 AM

Thanks Man. That Helped.. :)

Atchuthan - Technical Consultant, Sodexis Inc
6/11/14, 3:36 AM

This action close works for ir.actions.act_window but not work for ir.actions.client? How to close the ir.actions.client to close? Thanks in advance.

1
sayed fathy
11/25/13, 11:00 AM

use this

return {
    'type': 'ir.actions.client',
    'tag': 'reload',  }
1 Comment
Jasad
11/26/13, 5:16 AM

Hi Sayed, This will reload the entire application. I dont want to do so. Just refreshing the main window.

0
Isidre Guixà
12/17/18, 7:16 AM

I have gone from OpenERP 6.1 to Odoo11.
In OpenERP, nothing special was needed.
In Odoo11 I tried what he says Alexandro, but I do not get the expected performance.
Is there any way to get it in Odoo11?

1 Comment
Petar Najman
12/17/18, 7:56 AM

Hi Isidre,

This action was eventually converted into it's own module (``web_ir_actions_act_view_reload``) over at OCA github repository: https://github.com/OCA/web

You can use it with Odoo versions 11.0 and 12.0.

Kind Reagards,

Petar

0
Mariano DAngelo
6/19/18, 9:11 PM

Not working on odoo v9:

Action manager can't handle action of type ir.actions.act_close_wizard_and_refresh_view

  1. {flags: {…}, type: "ir.actions.act_close_wizard_and_refresh_view", context: {…}, menu_id: null}
    1. context:
      1. active_id:3
      2. active_ids:Array(1)
        1. 0:3
        2. length:1
        3. __proto__:Array(0)
      3. active_model:"sale.manage.variant"
      4. lang:"es_AR"
      5. params:{action318id9view_type"form"model"sale.order"_push_mefalse}
      6. search_disable_custom_filters:true
      7. tz:"Europe/Brussels"
      8. uid:1
      9. __proto__:Object
    2. flags:
      1. __proto__:Object
    3. menu_id:null
    4. type:"ir.actions.act_close_wizard_and_refresh_view"
    5. __proto__:
      1. constructor:ƒ Object()
      2. hasOwnProperty:ƒ hasOwnProperty()
      3. isPrototypeOf:ƒ isPrototypeOf()
      4. propertyIsEnumerable:ƒ propertyIsEnumerable()
      5. toLocaleString:ƒ toLocaleString()
      6. toString:ƒ toString()
      7. valueOf:ƒ valueOf()
      8. __defineGetter__:ƒ __defineGetter__()
      9. __defineSetter__:ƒ __defineSetter__()
      10. __lookupGetter__:ƒ __lookupGetter__()
      11. __lookupSetter__:ƒ __lookupSetter__()
      12. get __proto__:ƒ __proto__()
      13. set __proto__:ƒ __proto__()


Any idea why the action is not called?

0
Alexandros Vagkidas
5/4/17, 9:56 AM

Continuing the work mentioned previously, the following works on Odoo 9:


odoo.define('my_module.action_manager', function(require) { 
  var action_manager = require('web.ActionManager');
  var MyModuleActionManager = action_manager.include({
    ir_actions_act_close_wizard_and_reload_view: function (action, options) {
      if (!this.dialog) {
        options.on_close();
      }
      this.dialog_stop();
      this.inner_widget.active_view.controller.do_reload();
      return $.when();
    },
  });
  return MyModuleActionManager; });
Ask a Question
Writer
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

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

Test it now