How we can add the below chatter widget inside form view??
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_attachment"/>
</div>
Community v-13
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How we can add the below chatter widget inside form view??
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_attachment"/>
</div>
Community v-13
Hi Fasil,
If you want to add chatter in your object, then you will have to inherit the "mail.thread" object in your object as follow:
class MyClass(models.Model):
_name = 'my.class'
_inherit = ['mail.thread']
Now, add chatter widget in your form view in XML as follow:
<record id="view_my_class_form" model="ir.ui.view">
<field name="name">my.class.form</field>
<field name="model">my.class</field>
<field name="arch" type="xml">
<form>
<sheet>
.....
</sheet>
</form>
<!-- Add chatter and followers widget -->
<div class="oe_chatter">
<!-- Followers view -->
<field name="message_follower_ids" widget="mail_followers"/>
<!-- Chatter view -->
<field name="message_ids" widget="mail_thread"/>
</div>
</record>
Thank you Sudhir for respond.
But how we can do this inside form??
just add that div inside any group tag under your form...
See Below example:
group
div
strongAttachments & URLs div
div class="oe_chatter"
field name="message_follower_ids" widget="mail_attachment" string="Attachments"
div
group
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 2 25
|
1493 | ||
Chatter looks weird in 18.0
Đã xử lý
|
|
2
thg 12 24
|
2466 | |
|
0
thg 11 24
|
1411 | ||
|
1
thg 7 24
|
2203 | ||
|
2
thg 6 24
|
6330 |