You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
583 B

7 years ago
  1. # MuK Web Client
  2. Extends the Odoo web client to include
  3. bus channels. Channels can be created to listen to Odoo bus
  4. notifications. To add a channel listener to the client just
  5. extend the web client and declare a new bus channel.
  6. ### Example
  7. ```javascript
  8. var WebClient = require('web.WebClient');
  9. var session = require('web.session');
  10. WebClient.include({
  11. show_application: function() {
  12. var channel = session.db + '_mychannel';
  13. this.bus_declare_channel(channel, this.doSomething);
  14. return this._super();
  15. },
  16. doSomething: function(message) {
  17. ...
  18. }
  19. });
  20. ```