Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1753 Widoki

Hello dears,


when we have a customer in tasks, they are automatically subscribed as followers.

Even after I delete this customer from follower list, it will be re-added after next message.


I am looking for a way forbid this behavior, I do have access to the python files, just not sure which model or part of the python definitions controls this behavior.


Any help is welcome!

Awatar
Odrzuć
Najlepsza odpowiedź

Hello

You can write following code into your custom module.

class Task(models.Model):
    _inherit = 'project.task'

def message_subscribe
(self, partner_ids=None, subtype_ids=None):
    if self.partner_id.id in partner_ids : partner_ids.remove(self.partner_id.id)
        res = super(Task, self).message_subscribe(partner_ids=partner_ids,         subtype_ids=subtype_ids)
        return res


Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
4850
3
mar 15
11010
0
kwi 24
1343
0
sty 23
1741
0
paź 22
2244