Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
17046 มุมมอง

hi folks

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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,

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

use  class="oe_chatter o_chatter_position_right 

/

    


                       

                   

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Custom Module: How to add messages? แก้ไขแล้ว
8
เม.ย. 23
32605
0
มี.ค. 15
4832
3
มี.ค. 25
36608
0
มิ.ย. 18
3126
2
มี.ค. 16
6092