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

Can a note in Odoo 17 be restricted to internal users only, excluding companies or any other contacts?

Further explanation:

I want to ensure that my users can only tag internal employees in the chatter and not companies or any other contacts.

Avatar
Abbandona
Risposta migliore

From code side, Filters out portal users or external users then Link the user to their corresponding record (because Odoo stores partner info for both users and contacts).

class ResPartner(models.Model): 
​ _inherit = 'res.partner' 


 
​def _message_partner_allowed(self): 
 
​""" Restrict @mention to only internal users (employees) """ 
  ​internal_users = self.env['res.users'].search([('share', '=', False)]) 
 
​return internal_users.mapped('partner_id')

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 25
1165
2
mar 25
1426
0
feb 25
1099
0
feb 25
1253
0
feb 25
1207