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

I tried to modify the Meetings Calendar view to display tags after event's name. For now, I'm able to display IDs with categ_ids. How can I add the relation to display name of Meeting Type instead of IDs ?  

The following XML code is used to display categ ids in Calendar Meetings view:

<?xml version="1.0"?> <calendar string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday" display="[name] - [categ_ids.name]" color="color_partner_id" attendee="partner_ids" avatar_model="res.partner" mode="day" use_contacts="True" event_open_popup="271"> <field name="name"/> <field name="user_id"/> <field name="color_partner_id"/> <field name="partner_ids"/> <field name="categ_ids" widget="many2many_tags_name"/> </calendar>

 

 

 

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

You could probobly create a computed fields than appends your tags names.


tag_names = fields.Char(compute='_get_tag_names')


@api.one

@api.depends('categ_ids)

def _get_tag_names(self):

    self.tag_names = ', '.join(c.name for c in self.categ_ids)


Then use it in your calendar view:


display="[name] - [tag_names]"

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to disable days in odoo calendar? แก้ไขแล้ว
1
ก.พ. 21
8264
0
ก.พ. 24
1603
2
มี.ค. 22
6575
0
พ.ย. 20
3875
1
พ.ย. 19
7323