diff --git a/academic_sale_subscription/models/crm_lead.py b/academic_sale_subscription/models/crm_lead.py index 6de7c784..9489c9fc 100644 --- a/academic_sale_subscription/models/crm_lead.py +++ b/academic_sale_subscription/models/crm_lead.py @@ -16,3 +16,11 @@ def _create_customer(self, with_parent=None): with_parent=with_parent ) return super()._create_customer(with_parent=with_parent) + + def _message_post_after_hook(self, message, msg_vals): + """Override to prevent automatic partner assignment when posting messages through chatter. + In the standard CRM behavior, when you send a message from the chatter to a recipient + whose email matches the lead's email_from, it automatically assigns that partner to the lead. + This override disables that automatic assignment. + """ + return super(models.Model, self)._message_post_after_hook(message, msg_vals)