Advertisement
mariomolinos

Raise Error in Task Message

Aug 11th, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. for record in records:
  2.   if record.model == "project.task": #Only in project tasks.
  3.     if record.subtype_id.name == "Discussions": #Discussions is the Message Subtype for messages.
  4.       raise Warning('You are about to send an email, use Log Note instead of Send Message!\n\nThanks!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement