Odoo Help

Welcome!

This community 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.

2

How to use oe_chatter class

By
Shabeeh Kazmi
on 5/19/14, 7:51 AM 2,142 views

hi folks

any simple example to use oe_chatter class in our custom module?

3

Jignesh Mehta

--Jignesh Mehta--
2081
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 2/10/16, 8:09 AM

Hello Shabeeh,


In PY :-
class custom_class(modules.Model):

     _name = 'custom.class'

    _inherit = ['mail.thread', 'ir.needaction_mixin']


In Xml:-

<record id="custom_class_form_view" model="ir.ui.view">

    <field name="name">custom.class.form.view</field>

     <field name="model">custom.class</field>

    <field name="arch" type="xml">

        <form string="Custom Class">

              <sheet>

             <!-- Code for Form View -->
    
              </sheet>

            <div class="oe_chatter">

                <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>

                <field name="message_ids" widget="mail_thread"/>

            </div>

        </form>

    </field>

</record>



Thanks,

2
Pinakin Nayi (pna)
On 5/19/14, 8:31 AM

Just Define following code in your form view before </form> tag ending(it must need mail.thread inherited _inherit = ['mail.thread']).

                    <div class="oe_chatter">
                        <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
                        <field name="message_ids" widget="mail_thread"/>
                    </div>

 

Thanks,

Pinakin

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/19/14, 7:51 AM
Seen: 2142 times
Last updated: 2/10/16, 8:09 AM