odootaskprojectodoo-9nofollow

Odoo Is it possible to stop adding the project's followers to its task when it is created?


I have been managing Odoo 9 and there are some complain from customers who use odoo project to create issues about getting a lot of emails when tasks is created and commenting in the task.

When I remove the followers from the project, then the followers is not able to see the project anymore. That's not what I want.

So I tried to find a function that add its project followers to its task when created to override and thus remove the followers to its task created.

But somehow I cannot find the function to override.

Is there any other suggestion for me to solve this?

Thanks


Solution

  • You can do it using alternative solution, system will add followers in the task but system will not send any emails.

    class project_task(models.Model)
    
        _inherit="project.task"
    
        @api.model
        def create(self,vals)
            context=dict(self._context or {})
            context.update({'mail_notrack:True'})    
            return super(project_task,self.with_context(context)).create(vals)
    
        @api.multi 
        def write(self,vals):
            context=dict(self._context or {})
            context.update({'mail_notrack:True'}) 
        return super(project_task,self.with_context(context)).write(vals)
    

    `mail_notrack`` : at create and write, do not perform the value tracking creating messages

    In context you can pass mail_notrack True, then system will not send any email to ERP users when task is create or change stages.

    This may help you.