Before this commit, if you was searching something that return no results, you will call the sql query generating an error syntax: Traceback: ERROR: syntax error at or near ")" LINE 8: WHERE sub.id IN () Now, we don't make more useless query if we know that there are no users. + preventive fix the call of this method without user_ids This commit is related to #14667 closes odoo/odoo#33715 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>