How To Extend mail.Chatter Widget in Javascript Odoo 10

How To Extend mail.Chatter Widget in Javascript Odoo 10

Content Index :

How To Extend mail.Chatter Widget in Javascript Odoo 10
Tag : javascript , By : ack
Date : November 24 2020, 03:01 PM

help you fix your problem I want to add a new event to "mail.Chatter" widget(mail/static/src/js/chatter.js) in Odoo 10.so I want to extend the "mail.Chatter" widget. , This works for me
odoo.define('override_chatter.override_chatter', function (require) {
"use strict";

var core = require('web.core');
var Chatter = require('mail.Chatter');
var MailThread = core.form_widget_registry.get('mail_thread');

var MailThreadOverride = MailThread.include({

    init: function () {
    this._super.apply(this, arguments);



No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How to post a message in chatter during create method in Odoo?

Tag : development , By : Grant
Date : March 29 2020, 07:55 AM
seems to work fine I was writing create method for my own custom module. , Openerp 7 Create Method
def create(self, cr, uid, vals, context=None):
     new_id = super(CRM_Lead, self).create(cr, uid, vals, context=context)
     return new_id
def create(self, vals):
    rec = super(ClassName, self).create(vals)
    # ...        
    return rec

Odoo 9 How to edit chatter opportunity notes view

Tag : javascript , By : UpperLuck
Date : March 29 2020, 07:55 AM
help you fix your problem Ok guys, as always, I must to do everything by myself, so I will post what I found maybe I will help someone:
You need to go to static > src > xml > thread.xml there you must to search in website source what is this thing you want to edit:
<t t-if="message.model == 'crm.lead' &amp;&amp; (message.is_note)">
                    Type: <t t-esc="message.subtype_id[1]"/>
<div t-att-class="'o_thread_message_core' + (message.is_note ? ' o_mail_note' : '')">
            <p t-if="message.display_author" class="o_mail_info">
                <t t-if="message.is_note">
                    Note by

                <strong t-if="message.mailto">
                    <a class="o_mail_mailto" t-attf-href="mailto:#{message.mailto}?subject=Re: #{message.subject}">
                        <t t-esc="message.mailto"/>
                <strong t-if="!message.mailto &amp;&amp; message.author_id[0]"
                        data-oe-model="res.partner" t-att-data-oe-id="message.author_redirect ? message.author_id[0] : ''"
                        t-attf-class="#{message.author_redirect ? 'o_mail_redirect' : ''}">
                    <t t-esc="message.displayed_author"/>
                <strong t-if="!message.mailto &amp;&amp; !message.author_id[0]">
                    <t t-esc="message.displayed_author"/>

                <small t-att-title="message.date">
                    - <t t-esc="message.hour"/>

                <!-- VVV HERE I ADDED THIS VVV-->
                <t t-if="message.model == 'crm.lead' &amp;&amp; (message.is_note)">
                    Type: <t t-esc="message.subtype_id[1]"/>
                <!-- ^^^ HERE I ADDED THIS ^^^-->

                <t t-if="message.model &amp;&amp; (message.model != 'mail.channel') &amp;&amp; options.display_document_link">
                    on <a t-att-href="message.url" t-att-data-oe-model="message.model" t-att-data-oe-id="message.res_id"><t t-esc="message.record_name"/></a>
                <t t-if="message.origin_id &amp;&amp; (message.origin_id !== options.channel_id)">
                    (from <a t-att-data-oe-id="message.origin_id" href="#">#<t t-esc="message.origin_name"/></a>)
                    <i t-if="options.display_stars &amp;&amp; !message.is_system_notification"
                        t-att-class="'fa fa-lg o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
                        t-att-data-message-id="message.id" title="Mark as Todo"/>
                   <i t-if="message.record_name &amp;&amp; message.model != 'mail.channel' &amp;&amp; options.display_reply_icon"
                       class="fa fa-reply o_thread_message_reply"
                       t-att-data-message-id="message.id" title="Reply"/>
                    <i t-if="message.is_needaction &amp;&amp; options.display_needactions"
                       class="fa fa-check o_thread_message_needaction"
                       t-att-data-message-id="message.id" title="Mark as Read"/>


How to use Chatter in Odoo?

Tag : development , By : Saurabh
Date : March 29 2020, 07:55 AM
help you fix your problem In order to log changes of specific fields you need so set the track_visibility attribute on each field you want to track:
class OpStudent(models.Model):
    _name = 'op.student'
    _inherits = {
        'res.partner': 'partner_id',
    _inherit = [

    foo = fields.Char(track_visibility='always')

How to Override mail.chatter js of mail module in odoo 9?

Tag : jquery , By : fstender
Date : March 29 2020, 07:55 AM
wish helps you If you look at chatter.js, you will see that it only returns Chatter. And on the Chatter code you will see that the instance of the ChatterComposer that it holds is called composer:
this.composer = new ChatterComposer(...)
return {
    'Chatter': Chatter,
    'ChatterComposer': ChatterComposer,
var MyCustomChatterComposer = form_common.AbstractField.extend({...})
var chatter = require('mail.Chatter');

chatter.open_composer = function (options) {
    chatter.composer = new MyCustomChatterComposer();

odoo chatter doesn't appear in scrap form?

Tag : development , By : user107021
Date : March 29 2020, 07:55 AM
this will help You're extending the wrong way. The model which should implement the chatter, should be inheriting mail.thread and other mixins, if needed.
class StockScrap(models.Model):
    _name = 'stock.scrap'
    _inherit = ['stock.scrap', 'mail.thread']

    # and so on
Related Posts Related QUESTIONS :
  • Outputing a created object in javascript to a server side JSON file
  • Transition the numeric labels in a bar chart
  • createBottomTabNavigator: hide just one tab from the tabBar
  • iife vs simple statement behavior with document.title
  • showDialogPopup Refresh Page after Click
  • Child component does not set the initial value passed from the parent: ReactJS
  • Nodejs javascript added to button not responding
  • Trying to define a promise.all
  • Python GEE to extract featurecollection timeseries from Landsat imageries
  • How to write negative binary number?
  • Unable to set property of individual object
  • Why Named Function Expression itself cannot assign Name to another Value?
  • How to reset scroll position on single page pagination
  • How to scroll to bottom of page, when a new message is sent - Socket.io
  • How to reconstruct audio blob from a base64 encoded String?
  • How to calculate numbers within an array of objects
  • Using JavaScript to change CSS properties of SVG circles for all circles that was not clicked
  • Is there value in propTypeing repeat required properties at every level of nested components?
  • Call function if variable does not exist in a filter
  • localStorage value doesn't get updated automatically
  • React not updating state with setState correctly inside promises
  • Direct native JavaScript or jQuery method to get containing block of an element
  • Dynamic JSON object to Html Table
  • How to send Id and file to same controller?
  • How to Make a jQuery Table Cell(td) clickable to Run a Function?
  • Prevent the duplicate function onchange event jQuery
  • Reactjs Input Upload doesn't return local URL
  • An unexpected 'StartObject' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected
  • How to filter a JSON Array, with an eventListener input value at keyup
  • How to separate the different properties of filter in css?
  • Why dont work change event of bootstrap input spinner?
  • How to hide overflow text content in react
  • Is there another way to write line 6
  • Cypress - how to find by text content?
  • How to setstate for the dynamic checkboxes in a loop in react?
  • Is display:none safe?
  • How to create a form to change part of a href url of a button?
  • Put many function inside function in Javascript
  • how to exit from loop after a ajax call
  • Do Angular Reactive Form Validator.min/max check Perform Type Conversions before checking the value?
  • How to Replace Text Within Script Tags Using JQuery
  • add variable to object if not undefined using short-hand
  • How can I effectively curve my items inside a list?
  • Add new record Keyboard Shortcut on Kendo Grid Mvc
  • Time and Date running on page
  • Looping through page links puppeteer doesn't return values from the newly loaded page
  • Problem with Navigator.geoLocation.getCurrentPosition not working
  • Trying to change the id of an element with Javascript
  • Embedded Schema Inserting Blank in Meteor using Collection2
  • avoid useEffect to render at first load?
  • Why is this CSS transition only working correctly on the some clicks? How to solve it?
  • Interpolated values does not reflect the latest values in an Angular app
  • Javascript classes define attribute in constructor or outside the class
  • How to block scroll event passing through to iframe until iframe is active?
  • What is the purpose of "constructor" method in javascript?
  • Stencil JS not working with non-default imports
  • Are frameworks misleadingly named for marketing purposes?
  • React <Redirect> after transition not working
  • How to send multiple parameters in a function using EJS
  • React conditional style on custom click
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com