Daily updates from Odoo
Sunday, October 26, 2025
1 change · 18.0
Resolved issues and error corrections
Helpdesk can now create a ticket from an incoming email even when the sender's email matches a contact assigned to another company. This prevents missed support requests in multi-company setups by ensuring the ticket uses a company-compatible customer record.
Original PR description
**Steps to reproduce** - Have a helpdesk team for company A, with an email alias set up. - Have a `res.partner` belonging to company B with an email. To reproduce, there should be no contact with…
**Steps to reproduce** - Have a helpdesk team for company A, with an email alias set up. - Have a `res.partner` belonging to company B with an email. To reproduce, there should be no contact with this email in company A or with no company. - Send a message with the email of the `res.partner` to the alias of the helpdesk team. Issue: the ticket is not created. **Cause** The `_check_partner_id_has_the_same_company` constraint fails, preventing the ticket from being created. **Solution** We stop using the `author_id`, since it is not guaranteed to respect the constraint. https://github.com/odoo/enterprise/blob/a1fe558c8d6e27b435d350c23e19b93bbe611eb7/helpdesk/models/helpdesk_ticket.py#L755 This values comes from `_mail_find_partner_from_emails` in the mail module, which will prioritise a contact from the same company, but will not prevent one from another company being used. The existing code in `create` will call `_find_or_create_partner` to find/create one based on the name and mail. `_mail_find_partner_from_emails` is used instead of `find_or_create` to be able to provide an additional domain to ensure company consistency. opw-5154449 Forward-Port-Of: odoo/enterprise#97734