in this condition, i want to it keep creating the mail.message records, but NOT sending the email.
class MailMessage(models.Model):
_inherit = 'mail.message'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
body = vals['body']
if isinstance(body, Markup):
body_text = Markup.unescape(body)
if body_text[:5] == "gpt: ":
please help, i cant find any solution that meet my requirement anywhere. thank you