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

Hello All,

Actually I want to add "Schedule Activity" view for my model. 

for this I need to inherit "mail.activity.mixin" model in my model to achieve this feature. 

So anyone can help me to achieve this requirement in Odoo Studio? 

Thanks

อวตาร
ละทิ้ง

I need this! 

คำตอบที่ดีที่สุด

Hi,

You can add chatter using this option highlighted in the screenshot below to any inherited model.


Hope it helps

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
Try this:_inherit = ['mail.thread', 'mail.activity.mixin']
@api.multi def write(self, vals): for rec in self: vals = self._prepare_params_for_update(vals, rec) if vals['has_problem']: act_type_id = self.env['mail.activity.type'].search( [('name', 'ilike', 'Record Has Problems')], limit=1).id self.env['mail.activity'].create({ 'res_model_id': self.env.ref( < my_model_id > ).id, 'res_id': rec.id, 'user_id': rec.user_id.id, 'activity_type_id': act_type_id, 'date_deadline': vals['date_submitted'], }) return super(ChecklistRecord, self).write(vals)
อวตาร
ละทิ้ง
ผู้เขียน

Thanks Muhammad!

Thanks for you time and the code is right but I am asking how to achieve the same in Odoo Studio.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 24
1197
0
ก.ค. 24
721
1
ก.ย. 23
1912
1
ก.ย. 24
966
0
ก.ค. 24
864