Odoo Help

0

0
2 Answers
0
fisher
11/12/14, 4:03 AM

there is new module released

 https://github.com/szufisher/web/tree/8.0/web_auto_refresh

0
angel lacret
6/15/15, 8:29 PM


DISCALIMER: Not the best FIX, but it's a FIX.

NOTE: In teory odoo 8 web client engine must execute the Action that the Wizards returns in the python code function. This works in all views, except in Kanban views. So this is the workaround:

In the server, create a message in the odoo bus, every time you want to notify something happends:

            bus = self.env['bus.bus']
            message = {
                'subject': '',
                'body': 'Appointment Set',
                'mode': 'notify',
            }
            bus.sendone('<CHANNEL-NAME>', message)

Then, in the frontend you must listen for a message on this channel:

First, register the channel (With out this, it wouldn't work)

    openerp.bmwe_crm = function(instance, local) {
        var bus = instance.bus.bus;
        bus.add_channel("<CHANNEL-NAME>");   
        });
    };

Second, reload the kanban when something happend in the channel:

    openerp.bmwe_crm = function(instance, local) {
        var bus = instance.bus.bus;
        bus.add_channel("<CHANNEL-NAME>");
        instance.bus.bus.on("notification", instance, function(notification){
            instance.client.action_manager.inner_widget.views["kanban"].controller.do_reload();
        });
    };

Ask a Question
Writer
Keep Informed
2 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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now