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

Hi all,

I need to send a messagge to another user when I create a task in a project and I select that user.

Example: I create a task for user "Sandro", I would like that Sandro receive a messagge that there is a task for him.

Kind regards    

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

thank you... in which add on?

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

Use below python code in your add-on to send a message to user.

from openerp.osv import fields, osv
from openerp.tools.translate import _
class project_task(osv.osv):
_name = 'project.task'
def create(self, cr, uid, vals, context=None):
new_id = super(project_task, self).create(cr, uid, vals, context=context)
self.message_post(cr, uid, [new_id], body=_("Task Created"), subtype='mail.mt_comment', context=context)
return new_id

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
5
ส.ค. 23
4089
1
มี.ค. 15
5403
Project View & Task View แก้ไขแล้ว
4
ส.ค. 20
4081
5
มี.ค. 16
4376
2
ก.พ. 16
6130