---
title: "thread_phone (Odoo)"
description: "itgen_odoo_thread_phone"
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/datamodels/odoo/Odoo.mail.thread_phone
original: https://documentation.invantive.eu/en/datamodels/odoo/Odoo.mail.thread_phone
updated: 2023-03-01T15:29:04Z
license: https://documentation.invantive.eu/en/
---

# thread_phone: Odoo itgen_odoo_thread_phone

`read only` `per partition`

- Catalog: `Odoo`
- Schema: `mail`
- Label: itgen_odoo_thread_phone

Phone Blacklist Mixin

Can only retrieve data.

## Summary

Purpose of this mixin is to offer two services

      * compute a sanitized phone number based on ´´_sms_get_number_fields´´.
        It takes first sanitized value, trying each field returned by the
        method (see ``MailThread._sms_get_number_fields()´´ for more details
        about the usage of this method);
      * compute blacklist state of records. It is based on phone.blacklist
        model and give an easy-to-use field and API to manipulate blacklisted
        records;

    Main API methods

      * ``_phone_set_blacklisted``: set recordset as blacklisted;
      * ``_phone_reset_blacklisted``: reactivate recordset (even if not blacklisted
        this method can be called safely);

## Table Columns

The columns of the table `thread_phone` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update.

| Name | Data Type | Label | Required | Marks | Documentation |
|---|---|---|:---:|---|---|
| `has_message` | `boolean` | Has Message | [ ] |  |  |
| `message_attachment_count` | `int32` | Attachment Count | [ ] |  |  |
| `message_follower_ids` | `varchar2` |  | [ ] |  |  |
| `message_has_error` | `boolean` | Message Delivery error | [ ] |  | If checked, some messages have a delivery error. |
| `message_has_error_counter` | `int32` | Number of errors | [ ] |  | Number of messages with delivery error |
| `message_has_sms_error` | `boolean` | SMS Delivery error | [ ] |  | If checked, some messages have a delivery error. |
| `message_ids` | `varchar2` |  | [ ] |  |  |
| `message_is_follower` | `boolean` | Is Follower | [ ] |  |  |
| `message_main_attachment_id` | `varchar2` |  | [ ] |  |  |
| `message_main_attachment_id_label` | `varchar2` |  | [ ] |  |  |
| `message_needaction` | `boolean` | Action Needed | [ ] |  | If checked, new messages require your attention. |
| `message_needaction_counter` | `int32` | Number of Actions | [ ] |  | Number of messages which requires an action |
| `message_partner_ids` | `varchar2` |  | [ ] |  |  |
| `mobile_blacklisted` | `boolean` | Blacklisted Phone Is Mobile | [ ] |  | Indicates if a blacklisted sanitized phone number is a mobile number. Helps distinguish which number is blacklisted             when there is both a mobile and phone field in a model. |
| `phone_blacklisted` | `boolean` | Blacklisted Phone is Phone | [ ] |  | Indicates if a blacklisted sanitized phone number is a phone number. Helps distinguish which number is blacklisted             when there is both a mobile and phone field in a model. |
| `phone_mobile_search` | `varchar2` | Phone/Mobile | [ ] |  |  |
| `phone_sanitized` | `varchar2` | Sanitized Number | [ ] |  | Field used to store sanitized phone number. Helps speeding up searches and comparisons. |
| `phone_sanitized_blacklisted` | `boolean` | Phone Blacklisted | [ ] |  | If the sanitized phone number is on the blacklist, the contact won't receive mass mailing sms anymore, from any list |
| `website_message_ids` | `varchar2` |  | [ ] |  | Website communication history |



## Release Notes

What changed per release in the tables, columns, attributes and capabilities of the driver:

- [Odoo](/en/release-notes/drivers?driver=odoo)

