Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
16832 Vizualizări

hi folks

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

Imagine profil
Abandonează
Cel mai bun răspuns

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,

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

use  class="oe_chatter o_chatter_position_right 

/

    


                       

                   

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
8
apr. 23
32271
0
mar. 15
4643
3
mar. 25
36435
0
iun. 18
2955
2
mar. 16
5891