Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
4429 Vizualizări

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    

Imagine profil
Abandonează
Autor Cel mai bun răspuns

thank you... in which add on?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
5
aug. 23
4089
1
mar. 15
5403
4
aug. 20
4081
5
mar. 16
4376
2
feb. 16
6130