Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
3950 Vizualizări

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.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
5
nov. 17
6697
0
feb. 18
89
2
aug. 22
5030
3
ian. 19
9131
3
iun. 18
4623