This question has been flagged

I want to override the mail.Chatter template so that the "New message" button opens the full message composer. I want to do this with a custom module if it's possible? 

The template is in addons/mail/static/src/chatter.xml 

I want to override this

<t t-name="mail.Chatter">
    <div class="o_chatter">
	<div class="o_chatter_topbar">
	    <button type="button" class="btn btn-sm btn-primary o_chatter_button_new_message" title="Send a message">
		New message
	    </button>
	    <button t-if="widget.options.display_log_button" class="btn btn-sm btn-link o_chatter_button_log_note" title="Log a note. Followers will not be notified.">
		Log an internal note
	    </button>
	</div>
    </div>
</t>
with the function of this button
<t t-jquery=".o_composer_button_add_attachment" t-operation="after">
    <button tabindex="6" class="btn btn-sm btn-icon fa fa-pencil-square-o o_composer_button_full_composer" type="button"/>
</t>
I think that I need to change the "New message" button class attribute "o_chatter_button_new_message" to "o_composer_button_full_composer", but I don't know how.
I've tried
<templates id="template" xml:space="preserve">
    <t t-extend="mail.Chatter" >
         <t t-div="o_chatter_topbar" t-operation="replace">
             <button type="button" class="btn btn-sm btn-primary o_composer_button_full_composer" title="Send a message">
                New message
            </button>
            <button t-if="widget.options.display_log_button" class="btn btn-sm btn-link o_chatter_button_log_note" title="Log a note. Followers will not be notified.">
                Log an internal note
            </button>
         </t>
    </t>
</templates>

But it throws

Uncaught Error: QWeb2: Error while extending template 'mail.ChatterNo expression given

So is it possible to override this qweb template the same way as a view template and how? 

Avatar
Discard
Author

OK I've succesfully overriden it with "<t t-jquery=".o_chatter_button_new_message" t-operation="replace">

<button type="button" class="btn btn-sm btn-primary o_composer_button_full_composer" title="Send a message1234">

New message

</button>

</t>"

But now the problem is in addons/mail/static/src/js/chatter.js

where it looks for the o_chatter_button_new_message class in the wrong template

var ChatterComposer = composer.BasicComposer.extend({

template: 'mail.chatter.ChatComposer',

Hello, Were you ever able to figure this out? I am looking for this same functionality.

Author

Randall no I didn't.