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

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.

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
5
lis 17
6688
0
lut 18
89
2
sie 22
5002
3
sty 19
9106
3
cze 18
4592