Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
611 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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')

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Menu's with different default filter แก้ไขแล้ว
1
ก.ค. 25
1144
2
มี.ค. 25
1411
0
ก.พ. 25
1079
0
ก.พ. 25
1219
0
ก.พ. 25
1201