콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4418 화면

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

아바타
취소
관련 게시물 답글 화면 활동
5
8월 23
4083
1
3월 15
5402
4
8월 20
4080
5
3월 16
4375
2
2월 16
6127