İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
3920 Görünümler

I need to have a checkbox "hidden" when I add a note for projects,  tasks, issues with visibility to employees only, such notes is to be hidden for customers, suppliers, etc. Any ideas how to do it? So If the project, task or an issue have subsribed customers or supplires, they shoulnd't recieve notifications on hidden notes.

Avatar
Vazgeç
Üretici En İyi Yanıt

There is a buil-in solution: go to task, add customer as follower.

1.Write new massage for the task. It would be seen if customer log in to your website and click on the link to the task (when you add him to followers he will get the link).

2. Write an "internal note". The customer wouldn't see it in messages under the task.

Avatar
Vazgeç
En İyi Yanıt

Hello, do you mean by 'notes' some message sent through the chatter?

If so, you you need to create a special subtype for such messages and re-define the function def _search of mail.message. Here you need to add some condition, e.g:

       

        group_ids = self.env.user.groups_id # the list of acess groups of this user

        group_user_id = self.env.ref('base.group_user') # employee group guarantees it is not portal

        if group_user_id not in [group.id for group in group_ids]:

            args = [('subtype_id', 'not in', subtypes_to_restrict)] + list(args)

        return super(mail_message, self)._search(args, offset=offset, limit=limit, order=order,

            count=count, access_rights_uid=access_rights_uid)

Where subtypes_to_restrict is the list of messages subtypes, portal users do not have a right for.

In order to avoid sending notifications to portal users, just do not subscribe them for those subtypes.


Besides, this paid app - https://apps.odoo.com/apps/modules/10.0/internal_thread/ - let you send internal messages from any object (so internal notes attached to any records disregarding subtypes). Such messages would not be sent to portal users, and those users would not have access to them through the interface.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
5
Kas 17
6667
0
Şub 18
89
2
Ağu 22
4995
3
Oca 19
9067
3
Haz 18
4585