Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions academic_sale_subscription/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)