- flush must be done before executing queries
- when the current partner is given, it shouldn't be checked twice
- when a channel includes the given partners but also has more partners, it
shouldn't be returned
- query can be limited to 1 result, minor performance gain in the rare case
where more than one canonical channel exists
task-2324119
closesodoo/odoo#56680
X-original-commit: b716dd9e62991997e03556f2d3e2483921fedef9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>