Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Project task and follow function: how to send a messagge to an user?

By
Marco Baldocchi
on 1/8/16, 10:55 AM 425 views

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    

0
Marco Baldocchi
On 1/12/16, 10:54 AM

thank you... in which add on?

0
CatsandDogs
On 1/11/16, 2:38 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/8/16, 10:55 AM
Seen: 425 times
Last updated: 1/12/16, 10:54 AM