Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
676 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jul. 25
1177
2
mar. 25
1458
0
fev. 25
1109
0
fev. 25
1269
0
fev. 25
1219