Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
7476 Visualizzazioni

Hi,

I want to add the customer as a follower, using the helpdesk email partner email field, that is dropped in when select the partner. So that the customer is subscribed to the helpdesk record and gets a copy of the messages sent via "messages".

Can anyone help to the best way of doing this?

Avatar
Abbandona

Hello, Did you tried my solution ? is it worked ?

Risposta migliore

You may subscribe any partner to any object. Just push the button 'invite' in the top left corner. Be cautious: when sending a notification to your partner Odoo generates a signup url for the portal.

Besides, this module may be helpful to your purposes: https://apps.odoo.com/apps/modules/9.0/compoze_no_auto_subscribe/


Avatar
Abbandona
Risposta migliore

Hello,

First of all I am very disappointed by looking on the unrelated answers over here.

Here I put my thoughts with hope that you are a Odoo technical programer.

Actully functionally this is not possible unless there is some custom module developed for this feature. Only fields which are related to "res.users" class, they can be added to auto subscribe by configuration in Odoo.

*Important Tip* : Any field which is related to "res.users" class they can be easily added into auto subscribe by inherit this method :  _message_get_auto_subscribe_fields ( Your class must extend mail.thread ) 

However Partner field in Helpdesk form is related to "res.partner" class, so you have to develop custom code with override the write method like as follows,

In your custom module extend the crm.helpdesk object and add following method,

    def write(self, cr, uid, ids, values, context=None):
        """ Override to add case management: open/close dates """
        if values.get('partner_id') :
            self.message_subscribe(cr, uid, ids, [values['partner_id']], None, context=context)
        return super(crm_helpdesk, self).write(cr, uid, ids, values, context=context)

You have to override create method as well. So at the creation time, Selected Partner will automatically add in the followers area.

By adding above write method in your custom program, when you edit Partner in Helpdesk screen, the new partner will automatically added in followers area.

This is code which is tested and from one of my custom modules. So I am sure it will work.

Good Luck ! Let me know the result !

Hope this helps,

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mar 15
8950
1
ago 25
490
0
mar 25
1831
0
ott 24
1810
1
set 24
1891