Skip to content
Health
57/100
fair
  • Security22/25
    1 minor finding
  • Activity25/25
    Human commit this month
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 18.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.34 MB
Module directory on disk
Code analysis 4 migration notes 8 models 22 views 0 HTTP endpoints

Description

This module gives Odoo an inbox for the messages that the company receives by several channels (email, WhatsApp...), whatever the channel:

  • Receiving channels: the email addresses or phone numbers where the messages arrive. Each channel is a module (for example mail_message_import_email or mail_message_import_whatsapp).
  • Senders and their authorized addresses: the phones and email addresses allowed to send messages on behalf of each sender. A message from any other address waits in Unknown senders until a person assigns it to a sender, and the address can be authorized at the same time.
  • Conversations: the consecutive messages of a sender are grouped and processed together once the sender has been silent for some minutes, so that clarifications and corrections are read in context. The conversations are queued, retried when they fail and reported as incidents when they keep failing.
  • A panel with a card per receiving channel: unknown senders, incidents, conversations with errors or being processed, and the messages of the last days.

The module does not decide what a conversation means: other modules process them (for example to turn the documents received into orders). Without one, the conversations are just closed once grouped.

Dependencies

Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 22

XML IDNameModelTypeStatus
mail_message_import_address_view_list mail.message.import.address.list mail.message.import.address list New
mail_message_import_address_view_search mail.message.import.address.search mail.message.import.address search New
mail_message_import_assign_sender_view_form mail.message.import.assign.sender.form mail.message.import.assign.sender form New
mail_message_import_channel_view_form mail.message.import.channel.form mail.message.import.channel form New
mail_message_import_channel_view_kanban mail.message.import.channel.kanban mail.message.import.channel kanban New
mail_message_import_channel_view_list mail.message.import.channel.list mail.message.import.channel list New
mail_message_import_channel_view_search mail.message.import.channel.search mail.message.import.channel search New
mail_message_import_config_view_form mail.message.import.config.form mail.message.import.config form New
mail_message_import_conversation_view_form mail.message.import.conversation.form mail.message.import.conversation form New
mail_message_import_conversation_view_list mail.message.import.conversation.list mail.message.import.conversation list New
mail_message_import_conversation_view_search mail.message.import.conversation.search mail.message.import.conversation search New
mail_message_import_incident_view_form mail.message.import.incident.form mail.message.import.incident form New
mail_message_import_incident_view_kanban mail.message.import.incident.kanban mail.message.import.incident kanban New
mail_message_import_incident_view_list mail.message.import.incident.list mail.message.import.incident list New
mail_message_import_incident_view_search mail.message.import.incident.search mail.message.import.incident search New
mail_message_import_message_view_form mail.message.import.message.form mail.message.import.message form New
mail_message_import_message_view_graph mail.message.import.message.graph mail.message.import.message graph New
mail_message_import_message_view_list mail.message.import.message.list mail.message.import.message list New
mail_message_import_message_view_search mail.message.import.message.search mail.message.import.message search New
mail_message_import_sender_view_form mail.message.import.sender.form mail.message.import.sender form New
mail_message_import_sender_view_list mail.message.import.sender.list mail.message.import.sender list New
mail_message_import_sender_view_search mail.message.import.sender.search mail.message.import.sender search New

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 8

New fields (8)
  • active Boolean
    default=True
  • address Char
    help='Phone in international format for WhatsApp (+34 600 000 000), email address for email...' required=True
  • address_normalized Char
    compute='_compute_address_normalized' help='The address as the channel identifies the senders.' index=True store=True string='Normalized address'
  • authorized_date Datetime
    default=fields.Datetime.now readonly=True
  • channel_type Selection
    default=<expr> selection='_selection_channel_type' string='Channel'
  • company_id Many2one
    related='sender_id.company_id' store=True
  • name Char
    help="Who uses the address, e.g. 'Ana, buyer'." string='Label'
  • sender_id Many2one → mail.message.import.sender
    index=True ondelete='cascade' required=True args: 'mail.message.import.sender'
Public methods (0)

No public methods.

New fields (5)
  • authorize_address Boolean
    default=True help='Later messages of the address (the phone, the email address...) will be assigned to the sender directly.' string='Authorize the address'
  • message_ids Many2many → mail.message.import.message
    string='Messages' args: 'mail.message.import.message', 'mail_message_import_assign_sender_message_rel', 'wizard_id', 'message_id'
  • process_messages Boolean
    default=True help='Process the messages as a conversation of the sender; otherwise they are ignored.' string='Process the messages'
  • sender_count Integer
    compute='_compute_sender_count'
  • sender_id Many2one → mail.message.import.sender
    required=True args: 'mail.message.import.sender'
Public methods (1)
  • action_assign(self)

New fields (14)
  • active Boolean
    default=True
  • channel_type Selection
    default=<expr> help='How the messages arrive. Each channel is a module.' selection=[] string='Channel'
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • dashboard_graph Text
    compute='_compute_dashboard_graph'
  • error_count Integer
    compute='_compute_counters'
  • last_message_date Datetime
    compute='_compute_counters'
  • message_count Integer
    compute='_compute_counters'
  • name Char
    required=True
  • open_incident_count Integer
    compute='_compute_counters'
  • sequence Integer
    default=10
  • state Selection
    compute='_compute_state' args: [('not_configured', 'Not configured'), ('pending', 'Pending verification'), ('connected', 'Connected'), ('disabled', 'Disabled')]
  • state_message Char
    compute='_compute_state'
  • unidentified_count Integer
    compute='_compute_counters'
  • waiting_count Integer
    compute='_compute_counters'
Public methods (6)
  • action_view_conversations(self)
  • action_view_errors(self)
  • action_view_incidents(self)
  • action_view_messages(self)
  • action_view_unidentified(self)
  • action_view_waiting(self)

New fields (3)
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • inactivity_minutes Integer
    default=3 help='Minutes without new messages of a sender before its messages are processed together.' required=True
  • max_attempts Integer
    default=5 help='Attempts to process a conversation before it is left in error.' required=True string='Maximum attempts'
Public methods (1)
  • action_open_company_config(self)
    @api.model

New fields (22)
  • attempt_count Integer
    readonly=True
  • authorized_address_id Many2one → mail.message.import.address
    readonly=True string='Authorized address' args: 'mail.message.import.address'
  • channel_id Many2one → mail.message.import.channel
    ondelete='restrict' readonly=True required=True string='Receiving channel' args: 'mail.message.import.channel'
  • company_id Many2one → res.company
    readonly=True required=True args: 'res.company'
  • first_message_date Datetime
    readonly=True
  • incident_ids One2many → mail.message.import.incident
    readonly=True string='Incidents' args: 'mail.message.import.incident', 'conversation_id'
  • last_error Text
    readonly=True
  • last_message_date Datetime
    readonly=True
  • message_count Integer
    compute='_compute_counts'
  • message_ids One2many → mail.message.import.message
    readonly=True string='Messages' args: 'mail.message.import.message', 'conversation_id'
  • name Char
    copy=False default='/' readonly=True required=True
  • next_attempt_date Datetime
    index=True readonly=True
  • open_incident_count Integer
    compute='_compute_counts'
  • origin_display Char
    compute='_compute_origin_display' help='The channel and the phone or email address it came from.' string='Received by'
  • process_after Datetime
    index=True readonly=True
  • process_requested Boolean
    help='A person asked to process it without waiting for the inactivity.' readonly=True string='Processing requested'
  • processed_date Datetime
    readonly=True
  • processing_ref Char
    help='Identifier of the last attempt.' readonly=True string='Processing'
  • processing_start Datetime
    readonly=True
  • sender_address Char
    readonly=True required=True string='Address'
  • sender_id Many2one → mail.message.import.sender
    index=True ondelete='restrict' readonly=True required=True args: 'mail.message.import.sender'
  • state Selection
    default='open' index=True readonly=True required=True args: [('open', 'Waiting for messages'), ('processing', 'Processing'), ('done', 'Processed'), ('error', 'Error'), ('cancelled', 'Cancelled')]
Public methods (5)
  • action_process_now(self)
    Do not wait for the end of the inactivity delay, only for the files sent with the last messages, which arrive some seconds later.
  • action_retry(self)
    Process the conversation again with the next run of the cron.
  • action_view_incidents(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)

New fields (16)
  • authorized_address_id Many2one
    related='conversation_id.authorized_address_id' store=True string='Sent from'
  • can_retry Boolean
    compute='_compute_can_retry'
  • category Selection
    compute='_compute_category' store=True args: [('technical', 'Technical error'), ('incomplete', 'Incomplete data'), ('review', 'Human assessment')]
  • channel_id Many2one → mail.message.import.channel
    readonly=True string='Receiving channel' args: 'mail.message.import.channel'
  • company_id Many2one → res.company
    readonly=True required=True args: 'res.company'
  • conversation_id Many2one → mail.message.import.conversation
    index=True readonly=True args: 'mail.message.import.conversation'
  • description Text
  • incident_type Selection
    required=True string='Type' args: [('processing_error', 'Processing error')]
  • message_id Many2one → mail.message.import.message
    readonly=True args: 'mail.message.import.message'
  • name Char
    required=True string='Summary'
  • origin_display Char
    related='conversation_id.origin_display'
  • resolution_note Text
  • resolved_by_id Many2one → res.users
    readonly=True args: 'res.users'
  • resolved_date Datetime
    readonly=True
  • sender_id Many2one → mail.message.import.sender
    index=True readonly=True args: 'mail.message.import.sender'
  • state Selection
    default='open' index=True required=True tracking=True args: [('open', 'Open'), ('resolved', 'Resolved'), ('dismissed', 'Dismissed')]
Public methods (6)
  • action_dismiss(self)
  • action_open_conversation(self)
  • action_reopen(self)
  • action_resolve(self)
  • action_retry(self)
    Process the conversation again, once the cause is corrected.
  • write(self, vals)

New fields (23)
  • attachment_count Integer
    compute='_compute_attachment_count' string='Number of files'
  • attachment_ids Many2many → ir.attachment
    readonly=True string='Files' args: 'ir.attachment', 'mail_message_import_message_attachment_rel', 'message_id', 'attachment_id'
  • authorized_address_id Many2one → mail.message.import.address
    readonly=True string='Authorized address' args: 'mail.message.import.address'
  • body Text
    readonly=True string='Text'
  • channel_id Many2one → mail.message.import.channel
    index=True ondelete='restrict' readonly=True required=True string='Receiving channel' args: 'mail.message.import.channel'
  • channel_type Selection
    related='channel_id.channel_type' store=True
  • company_id Many2one → res.company
    readonly=True required=True args: 'res.company'
  • conversation_id Many2one → mail.message.import.conversation
    index=True readonly=True args: 'mail.message.import.conversation'
  • mail_message_id Many2one → mail.message
    ondelete='set null' readonly=True string='Posted message' args: 'mail.message'
  • media_pending Boolean
    help='Its files stay in its channel until the conversation is processed.' readonly=True string='Files to download'
  • message_date Datetime
    readonly=True string='Sent on'
  • message_type Selection
    readonly=True string='Type' args: MESSAGE_TYPES
  • message_uid Char
    help='Identifier of the message in its channel.' index=True readonly=True required=True string='Message ID'
  • name Char
    compute='_compute_name'
  • note Text
    readonly=True
  • origin_display Char
    compute='_compute_origin_display' help='The channel and the phone or email address it came from.' string='Received by'
  • raw_payload Text
    help='The message as its channel delivered it.' readonly=True string='Original data'
  • received_date Datetime
    default=fields.Datetime.now readonly=True string='Received on'
  • reply_to_uid Char
    help='Identifier of the message it replies to, in its channel.' readonly=True string='Reply to'
  • sender_address Char
    help='Address that sent the message: the phone for WhatsApp, the email address for email...' index=True readonly=True string='Address'
  • sender_id Many2one → mail.message.import.sender
    index=True ondelete='restrict' readonly=True args: 'mail.message.import.sender'
  • sender_name Char
    readonly=True string='Sender name'
  • state Selection
    default='queued' index=True readonly=True required=True args: [('unidentified', 'Unidentified sender'), ('queued', 'Waiting'), ('processed', 'Processed'), ('ignored', 'Ignored')]
Public methods (3)
  • action_assign_sender(self)
  • action_view_attachments(self)
  • action_view_conversation(self)

New fields (10)
  • active Boolean
    default=True tracking=True
  • address_count Integer
    compute='_compute_counters'
  • address_ids One2many → mail.message.import.address
    string='Authorized addresses' args: 'mail.message.import.address', 'sender_id'
  • company_id Many2one → res.company
    default=<expr> help='Company that receives the messages of the sender.' required=True tracking=True args: 'res.company'
  • conversation_count Integer
    compute='_compute_counters'
  • message_count Integer
    compute='_compute_counters'
  • name Char
    required=True tracking=True
  • note Text
  • open_incident_count Integer
    compute='_compute_counters'
  • partner_id Many2one → res.partner
    check_company=True help='Contact of the sender in Odoo.' string='Contact' args: 'res.partner'
Public methods (4)
  • action_view_conversations(self)
  • action_view_incidents(self)
  • action_view_messages(self)
  • write(self, vals)

Loading…