[FIX] mail: exclude portal user from the DM search
Before this commit, a user could DM a portal user. Portal user are not supported and can't chat. task-2632874 closes odoo/odoo#77568 X-original-commit: a7eda6d7314e7261ddda32620fae817f1d828bae Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -237,6 +237,7 @@ class Partner(models.Model):
|
||||
WHERE P.name ILIKE %s
|
||||
AND P.id NOT IN %s
|
||||
AND U.active = 't'
|
||||
AND U.share IS NOT TRUE
|
||||
ORDER BY P.name ASC, P.id ASC
|
||||
LIMIT %s
|
||||
""", ("%s seconds" % DISCONNECTION_TIMER, "%s seconds" % AWAY_TIMER, name, tuple(excluded_partner_ids), limit))
|
||||
|
||||
Reference in New Issue
Block a user