Automated Task E-mails for OpenERP Project Management

    ‘Automated Task E-mails’ is a functionality developed by Zesty Beanz for Automating Task notification emails in OpenERP Project Management. The functionality is achieved as a separate module by extending the project managemnet module in OpenERP.

 

Task E-mails(zb_task_emails)

Module : zb_task_emails

Name : Task E-mails

Version : 6.0.1.0

Author : Zesty Beanz Technologies Pvt Ltd

Website : www.zbeanztech.com

 

Description

* This module allows users to receive notification e-mails, related to tasks in OpenERP Project Management.

* Notifications are sent to ‘Assigned User’ or ‘Project Manager’ upon various actions, changes and updates in a particular task

Dependencies

project

hr

smtpclient

Menus

Administration/Configuration/Sendmail Services/Email Templates

 

Views

  * INHERIT email.smtpclient.form(form)

  * INHERIT email.smtpclient.queue.form(form)

  *INHERIT email.smtpclient.queue.tree(tree)

  *INHERIT res.company.form.inherit1(form)

  email.smtpclient.email.template.form(form)

  email.smtpclient.email.template.tree(tree)

Description

     ‘zb_task_emails’ is an extention of the openerp module ‘project’. It automates the email notifications related to a particular task. E-mails are sent using the module ‘smtpclient’. An email is sent during the following occasions.

  1. Start Task : During the button action an e-mail is sent to the Assigned User. Copy to Project Manager
  2. Done : When a task is completed , e-mail sent to Project Manager. Copy to Assigned User
  3. Reactivate : On reactivating a task, e-mail sent to the Assigned User. Copy to Project Manager
  4. Pending : When a task is set to pending state, e-mail is sent to Project Manager. Copy to Assigned User
  5. Cancel: When a task is cancelled, e-mail is sent to Project Manager. Copy to Assigned User
  6. Task Description Changes: When the description of a task is changed, e-mail is sent to the Assigned User. Copy to Project Manager
  7. Task work entered or updated : When the users enter or modify work detials, e-mail is sent to Project Manager. Copy to Assigned User
  8. Task reassigned : When the task is handed over to another user, e-mail is sent to the newly Assigned User. Copy to Project Manager
  9. Ending date crossed : if a task has no entries in its ‘Task Work’, even after the ending date of the task, a warning mail is sent to Project Manager. Copy to Assigned User

Configuration

  1. Employee

    Tasks are assigned to users in OpenERP. A user must be an employee to receive e-mail notification. So Create employess and relate them to users. Provide e-mail id in the ‘Work E-mail’ field of the employee. Automated task e-mails are sent to that particular email id. If an employee doesn’t have a ‘Work E-mail’ , he won’t receive notification emails for the tasks he belongs to.

  2. SMTP Server
    Menu : ‘Administration/Configuration/Sendmail Services/SMTP Servers’.
    Create a new server with ‘type’ = ‘task’ (The field will be available only if the module ‘zb_task_emails’ is installed). You may check the following link to configure the server easily http://zbeanztech.com/?q=blog/sending-emails-openerp-using-module-smtpclient
  3. Email Templates
    Menu : ‘Administration/Configuration/Sendmail Services/Email Templates’.
    Here we define the body of each type of emails with the help of merge fields. The OpenERP fields and corresponding merge fields are mentioned at the bottom of the form. We can define 9 ‘types’ of template, like ‘Task’, ‘Task(Completed)’, etc.. You can’t have more than one template of the same type. OpenERP will automatically choose the email body from any of these templates and send the the email, based on the action committed by the user.

  4. Task Warning Scheduler
    Menu :’Administration/Configuration/Scheduler/Scheduled Actions’.
    The scheduler checks the ‘ending date’ of all the tasks in state – ‘In Progress’, during every pre-defined interval. If the ‘Task work’ of any of these tasks are found to be empty, in one hour after the scheduled ending time, an email is sent to Project Manager and copy to Assigned User.

     

Comments

vishnu: @Mihai : very soon, we will make it available for download in our site itself. If you want to get it before that, please provide your email id. I can mail it ".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Mihai says:

    Is the module public available?
    Where I can download it?
    Thanks

    1. vishnu says:

      @Mihai : very soon, we will make it available for download in our site itself. If you want to get it before that, please provide your email id. I can mail it

      1. Hi,
        Am interested in the task email plugin, could you mail it to me please.
        regards,
        duncan

        1. vishnu says:

          pass your email id. send an email to contact@zbeanztech.com

          1. Anonymous says:

            Hello,
            Great post. I think email_template module is better than smtp_client. smtp_client hangs the server frequently. What do you think?

        2. vishnu says:

          I have atached the module along with this blog now. You may try it

          1. Vasiliy says:

            Hello!
            We trying to use Your module. We create simple task and we have next error – field Disclaimers is missing. After this cc_to fild missing, then bcc_to field missing. What is your problem.
            Please help. After this we will upgrade your module and we can give newer version to You if You want. This is very useful functionality.

          2. vishnu says:

            it seems to be a dependecy related issue. plase check  the version of  smtpclient module.

  2. SimoneP says:

    Hello,
    Your module is really great, but I have problems with sending mail at the change of status.
    The mails are sent only at opening and reopening of the activity.
    I don’t understand if I miss something in configuration (where I can do it) or if I must to add an action.
    Thank you and good job.
    Simone

    1. vishnu says:

      one of the reasons is see, is an emty list as an in put to the "To" field of the email. Make sure that, the users are employee and they have a work email in their record.

  3. Francis says:

    Hey great module, thanks man. I was wondering I can’t seem to get the URL at the bottom of the email sent to change to the ip address of the server instead of saying localhost. Have you got any ideas?

    1. vishnu says:

      Follow the menu, "Administration>Companies>Companies". In the "configuration" tab of your company, there is a field, "webclient". Here you can change the url.

  4. I configured the 2 models as indicated by the post. So far so good.
    The problem is that when I try to save or start a task, I get the following error:
    * File “/ mnt / data / openerp / server / bin / addons / zb_task_emails.zip / zb_task_emails / project.py”, line 85, in pm = tasks.project_id.user_id.id write AttributeError: ‘NoneType’ object has no attribute ‘id’
    Could you help me?
    Thanks in advance,

  5. muthunaveen says:

    hi vishnu, Your article exactly meets my need. Great. Clarify me that this zb_task_emails.zip can be configured for openERP 6.1 version released recently? kindly reply to my mail muthunavaneethakumar@gmail.com

    1. muthunaveen says:

      hey i have downloaded ur zb_task_emails.zip and installed in my OpenErp 6.1 stable version through update modules and did the setting, configurations as mentioned in the blog. I have evolution as my default mail setup. It supports SMTP.
      But when i create a new task,start task,assign or edit or delete it shows the following error and am unable to proceed.. can u kindly help me in this regard..
      Client Traceback (most recent call last):
      File “/home1/naveen/Desktop/a/webclient/addons/web/common/http.py”, line 180, in dispatch
      response[“result”] = method(controller, self, **self.params)
      File “/home1/naveen/Desktop/a/webclient/addons/web/controllers/main.py”, line 1004, in call_button
      action = self.call_common(req, model, method, args, domain_id, context_id)
      File “/home1/naveen/Desktop/a/webclient/addons/web/controllers/main.py”, line 948, in call_common
      return self._call_kw(req, model, method, args, {})
      File “/home1/naveen/Desktop/a/webclient/addons/web/controllers/main.py”, line 962, in _call_kw
      return getattr(req.session.model(model), method)(*args, **kwargs)
      File “/home1/naveen/Desktop/a/webclient/addons/web/common/openerplib/main.py”, line 250, in proxy
      args, kw)
      File “/home1/naveen/Desktop/a/webclient/addons/web/common/openerplib/main.py”, line 117, in proxy
      result = self.connector.send(self.service_name, method, *args)
      File “/home1/naveen/Desktop/a/webclient/addons/web/common/http.py”, line 611, in send
      raise fault
      Server Traceback (most recent call last):
      File “/home1/naveen/Desktop/a/webclient/addons/web/common/http.py”, line 592, in send
      result = openerp.netsvc.dispatch_rpc(service_name, method, args)
      File “/home1/naveen/Desktop/a/server/openerp/netsvc.py”, line 360, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
      File “/home1/naveen/Desktop/a/server/openerp/service/web_services.py”, line 572, in dispatch
      res = fn(db, uid, *params)
      File “/home1/naveen/Desktop/a/server/openerp/osv/osv.py”, line 167, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
      File “/home1/naveen/Desktop/a/server/openerp/osv/osv.py”, line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
      File “/home1/naveen/Desktop/a/server/openerp/osv/osv.py”, line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
      File “/home1/naveen/Desktop/a/server/openerp/osv/osv.py”, line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
      File “/home1/naveen/Desktop/a/addons/zb_task_emails/project.py”, line 44, in do_open
      super(task, self).do_open(cr, uid, ids, args)
      File “/home1/naveen/Desktop/a/addons/project_mailgate/project_mailgate.py”, line 94, in do_open
      res = super(project_tasks, self).do_open(cr, uid, ids, context)
      File “/home1/naveen/Desktop/a/addons/project/project.py”, line 899, in do_open
      self.write(cr, uid, [t.id], data, context=context)
      File “/home1/naveen/Desktop/a/addons/zb_task_emails/project.py”, line 92, in write
      result= super(task, self).write(cr, uid, ids, vals, context)
      File “/home1/naveen/Desktop/a/addons/project/project.py”, line 1049, in write
      result = super(task,self).write(cr, uid, ids, vals, context=context)
      File “/home1/naveen/Desktop/a/server/openerp/osv/orm.py”, line 3833, in write
      self._check_concurrency(cr, ids, context)
      File “/home1/naveen/Desktop/a/server/openerp/osv/orm.py”, line 3599, in _check_concurrency
      if not (context.get(self.CONCURRENCY_CHECK_FIELD) and self._log_access):
      AttributeError: ‘tuple’ object has no attribute ‘get’

      1. Anonymous says:

        Same problem here, any idea how to solve that?
        thx

        1. juan says:

          Para solucionar el tema de la concurrencia, hay que pasarle un entero y no una lista al write del padre, verifiquen esto en la linea del project.py
          la seguna lina cambia agregando el [0] al ids
          def write(self, cr, uid, ids, vals, context=None):
          # if type(ids) == type(1):
          # ids = [ids]
          # print ids,type(ids)
          if type(ids) != type([]):
          ids = [ids]
          if len(ids) <> 1:
          return super(task, self).write(cr, uid, ids, vals, context)
          else:
          # Controlo que el contexto sea un diccionario y no una tupla, esto pasa cuando cambiamos de estado, NO SE POR QUE pero esto lo soluciona.
          if type(context) is tuple:
          context = context[0]
          result = super(task, self).write(cr, uid, ids[0], vals, context)
          #cr.commit()

          1. Terr Vans says:

            This modification makes the module work in OpenERP 6.1?
            You could show the whole implementation?

          2. cualit says:

            I tested your changes in OpenERP Version 6.1.1 without any luck, always getting the same error.
            Any help is appreciated.

          3. cualit says:

            Hice los cambios que tu sugerías pero sin suerte. Los cambios fueron:
            if type(context) is tuple:
            context = context[0]
            result = super(task, self).write(cr, uid, ids[0], vals, context)
            #cr.commit()
            Te agradezco si me puedes ayudar.
            Estoy probando el módulo en OpenERP Version 6.1.1

  6. Atul says:

    Vishnu,
    Its quiet informative stuff you have shared with the users.
    We have been trying the similar things into the V7 of OE. But facing last mile connectivity problem.
    So when someone finish the task, or start the task, or assign the task than the emails should be generated to project manager, to client, etc.
    So do you share some idea how to get those thing done?
    Or else just than 1 email how to do write action on button to send the email of that object.
    Thank you,

  7. Anonymous says:

    how to send the wishes for birthday via email template ..??

    1. Ann says:

      I was extremely pleased to uncover this site. I need to to thank you for
      your time for this particularly wonderful
      read!! I definitely really liked every little bit of it and I have you book marked to check
      out new stuff in your site.

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.