notify_user
Write an internal note or comment on any Odoo record's chatter and notify specified users via inbox or email, with control over message visibility and customer email alerts.
Instructions
Write a note on a record's chatter and notify the users you name.
Both subtypes post a message that IS VISIBLE in the record's chatter. The difference is who it reaches beyond the people you name.
Args:
model: the Odoo model, e.g. "sale.order".
record_id: id of the record to write on.
message: the body. Send PLAIN TEXT: Odoo escapes anything that arrives
over RPC, so "x" is displayed as the literal characters
<b>x</b>, not as bold — there is no way to pass real markup
through this call, and newlines survive but are not turned into
line breaks. Write the note as prose.
user_ids: res.users ids to notify. They are notified each through
their OWN Odoo setting, inbox or email, so naming someone is not a
promise that no mail leaves.
subtype: where the message lands.
| subtype | visible in the chatter | emails a customer |
|-----------|------------------------|-------------------|
| "note" | yes, internal users | never |
| "inbox" | NO — notification only | never |
| "comment" | yes, everyone | **YES** |
"note" posts `mail.mt_note` and is the default: measured on a real
order it produced one inbox notification and zero emails.
"inbox" goes through `message_notify`, which Odoo documents as the
path for "messages that should not be displayed on a document" —
the person is notified, the record keeps no trace. "comment" posts
`mail.mt_comment` and is refused while an external follower
exists, unless force=True.
force: post the comment anyway, knowing those people get an email.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| model | Yes | ||
| message | Yes | ||
| subtype | No | note | |
| user_ids | Yes | ||
| record_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |