Before this commit: if the partner belonged to "Company B" and the default company was "Company A", it would cause an issue during the creation of the record (opportunity, ticket, ...) from the mail plugin. Community PR: https://github.com/odoo/odoo/pull/112088 The solution is to use the partner's company to create. opw-3141578 closes odoo/odoo#118831 X-original-commit: 21dc6cd01d9262fdf0007249194857e4b75e695e Related: odoo/enterprise#39903 Signed-off-by: Stéphane Debauche (std) <std@odoo.com>