Skip to Content
Menu
This question has been flagged
2990 Views

I am tryint to develope a module taht when you assign a task to a user automatically this user becomes a follower of the project. My code is:


# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models, fields

class mod_project_project(models.Model):
_inherit = 'project.project'

@api.onchange('project.task.user_id')

def _onchange_partner(self):

if not project.task.user_id in message_follower_ids:

self.partner_id.message_subscribe(project.task.user_id)

But I don't get any result.


Thanks in advance


Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
41
2
Nov 24
156
1
Oct 24
183
1
Jun 24
363
2
Jun 24
424