Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
16948 Lượt xem

hi folks

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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,

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

use  class="oe_chatter o_chatter_position_right 

/

    


                       

                   

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
8
thg 4 23
32472
0
thg 3 15
4764
3
thg 3 25
36533
0
thg 6 18
3038
2
thg 3 16
5978