0

In chatter "New message" is rarely used by our users. The user opens form where a chatter is but has to click "Log internal note" every time (because "New message" is rarely used).

How to make so that when user opens form (which contains chatter) the "Log internal note" from the chatter is opened?

Odoo version 10. If that can be done through UI it is preferred but any solution is ok. Thank you. :)

2 Answers2

1

You have to send an onclick event to the Log internal note element.

You can do this in a numerous ways, all of them require extensions to the web client. You can see the functionality in implemented in Chatter.js

Specifically you want to send a click to the element that contains the class o_chatter_button_log_note you can send the click on the initialization of this widget, so that when this widget is loaded from wherever this is loaded the Log internal note will pop up.

As to how you modify the web client of Odoo, refer to the documentation.

George Daramouskas
  • 3,720
  • 3
  • 22
  • 51
0

This is what worked.

odoo.define('x_note.note_click', function(require) {
    "use strict";


    var core = require('web.core');

    var Chatter = require('mail.Chatter');

    var MailThread = core.form_widget_registry.get('mail_thread');

    var NewChatter = MailThread.include({
        start: function() {
            this._super.apply(this, arguments);
            this.$(".o_chatter_button_log_note").trigger('click');
        },
    });
});