> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Odoo as a data source

> Bring data from Odoo to Nekt.

Odoo is an open-source enterprise resource planning (ERP) system that helps businesses manage their operations, including sales, inventory, accounting, manufacturing, and more. It provides a comprehensive suite of integrated business applications designed to streamline workflows and improve efficiency.

## Configuring Odoo as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Odoo option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

You'll need to authorize Nekt to access your Odoo instance. Provide the necessary credentials and connection details for your Odoo installation.

The following configurations are available:

* **API URL**: The base URL of your Odoo instance (e.g., `https://mycompany.odoo.com`). This is the root URL where your Odoo instance is hosted.

* **API Key**: The API key (bearer token) to authenticate against the Odoo API. This token grants access to your Odoo instance and must have the necessary permissions to read the data you want to extract.

* **Database**: (Optional) The name of the database to connect to. This is only required when a single Odoo server hosts multiple databases. If your instance uses a single database or the database name is determined automatically, you can leave this field empty.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data - which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if, for example, you don't want to have deleted data in your catalog.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can define some additional settings:

* Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).
* Determine when to execute an **Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync)**. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find all available data streams from Odoo and their corresponding fields:

<AccordionGroup>
  <Accordion title="Payment">
    Stream for retrieving payment records from Odoo's `account.payment` model. This stream contains payment transactions and their associated details.

    | Field                                 | Type     | Description                                                |
    | :------------------------------------ | :------- | :--------------------------------------------------------- |
    | `id`                                  | Integer  | Unique identifier for the payment record                   |
    | `name`                                | String   | Payment number/reference                                   |
    | `amount`                              | Number   | Payment amount                                             |
    | `date`                                | DateTime | Payment date                                               |
    | `state`                               | String   | Payment state (draft, posted, sent, reconciled, cancelled) |
    | `payment_type`                        | String   | Type of payment (inbound, outbound)                        |
    | `partner_type`                        | String   | Partner type (customer, supplier)                          |
    | `create_date`                         | DateTime | Timestamp                                                  |
    | `write_date`                          | DateTime | Timestamp                                                  |
    | `amount_signed`                       | Number   | Signed payment amount                                      |
    | `amount_company_currency_signed`      | Number   | Amount in company currency                                 |
    | `amount_available_for_refund`         | Number   | Available refund amount                                    |
    | `currency_id`                         | Integer  | Currency identifier                                        |
    | `company_currency_id`                 | Integer  | Company currency identifier                                |
    | `effective_date`                      | DateTime | Effective payment date                                     |
    | `payment_method_id`                   | Integer  | Payment method identifier                                  |
    | `payment_method_code`                 | String   | Payment method code                                        |
    | `payment_method_line_id`              | Integer  | Payment method line identifier                             |
    | `payment_token_id`                    | Integer  | Saved payment token identifier                             |
    | `payment_transaction_id`              | Integer  | Payment transaction identifier                             |
    | `use_electronic_payment_method`       | Boolean  | Whether electronic payment method is used                  |
    | `partner_id`                          | Integer  | Customer/Vendor identifier                                 |
    | `partner_bank_id`                     | Integer  | Recipient bank account identifier                          |
    | `require_partner_bank_account`        | Boolean  | Whether partner bank account is required                   |
    | `show_partner_bank_account`           | Boolean  | Whether to show partner bank account                       |
    | `destination_account_id`              | Integer  | Destination account identifier                             |
    | `outstanding_account_id`              | Integer  | Outstanding account identifier                             |
    | `journal_id`                          | Integer  | Journal identifier                                         |
    | `company_id`                          | Integer  | Company identifier                                         |
    | `available_journal_ids`               | Array    | Available journal identifiers                              |
    | `available_partner_bank_ids`          | Array    | Available partner bank identifiers                         |
    | `available_payment_method_line_ids`   | Array    | Available payment method line identifiers                  |
    | `invoice_ids`                         | Array    | Related invoice identifiers                                |
    | `reconciled_invoice_ids`              | Array    | Reconciled invoice identifiers                             |
    | `reconciled_invoices_count`           | Integer  | Number of reconciled invoices                              |
    | `reconciled_invoices_type`            | String   | Type of reconciled invoices                                |
    | `reconciled_bill_ids`                 | Array    | Reconciled bill identifiers                                |
    | `reconciled_bills_count`              | Integer  | Number of reconciled bills                                 |
    | `reconciled_statement_line_ids`       | Array    | Reconciled statement line identifiers                      |
    | `reconciled_statement_lines_count`    | Integer  | Number of reconciled statement lines                       |
    | `is_reconciled`                       | Boolean  | Whether payment is reconciled                              |
    | `is_matched`                          | Boolean  | Whether matched with bank statement                        |
    | `payment_reference`                   | String   | Payment reference                                          |
    | `bank_reference`                      | String   | Bank reference                                             |
    | `cheque_reference`                    | String   | Cheque reference                                           |
    | `check_number`                        | String   | Check number                                               |
    | `check_amount_in_words`               | String   | Amount in words                                            |
    | `check_layout_available`              | Boolean  | Whether check layout is available                          |
    | `check_manual_sequencing`             | Boolean  | Whether manual numbering is used                           |
    | `show_check_number`                   | Boolean  | Whether to show check number                               |
    | `qr_code`                             | String   | QR Code URL                                                |
    | `payment_receipt_title`               | String   | Payment receipt title                                      |
    | `move_id`                             | Integer  | Journal entry identifier                                   |
    | `source_payment_id`                   | Integer  | Source payment identifier                                  |
    | `paired_internal_transfer_payment_id` | Integer  | Paired internal transfer payment identifier                |
    | `duplicate_payment_ids`               | Array    | Duplicate payment identifiers                              |
    | `refunds_count`                       | Integer  | Number of refunds                                          |
    | `activity_ids`                        | Array    | Activity identifiers                                       |
    | `activity_calendar_event_id`          | Integer  | Next activity calendar event identifier                    |
    | `activity_date_deadline`              | DateTime | Next activity deadline                                     |
    | `activity_state`                      | String   | Activity state                                             |
    | `activity_summary`                    | String   | Next activity summary                                      |
    | `activity_type_id`                    | Integer  | Next activity type identifier                              |
    | `activity_user_id`                    | Integer  | Responsible user identifier                                |
    | `activity_exception_decoration`       | String   | Activity exception decoration                              |
    | `activity_exception_icon`             | String   | Activity exception icon                                    |
    | `activity_type_icon`                  | String   | Activity type icon                                         |
    | `my_activity_date_deadline`           | DateTime | My activity deadline                                       |
    | `message_ids`                         | Array    | Message identifiers                                        |
    | `message_follower_ids`                | Array    | Follower identifiers                                       |
    | `message_partner_ids`                 | Array    | Follower partner identifiers                               |
    | `message_attachment_count`            | Integer  | Attachment count                                           |
    | `message_main_attachment_id`          | Integer  | Main attachment identifier                                 |
    | `message_has_error`                   | Boolean  | Whether message has error                                  |
    | `message_has_error_counter`           | Integer  | Number of message errors                                   |
    | `message_has_sms_error`               | Boolean  | Whether message has SMS error                              |
    | `message_is_follower`                 | Boolean  | Whether user is follower                                   |
    | `message_needaction`                  | Boolean  | Whether action is needed                                   |
    | `message_needaction_counter`          | Integer  | Number of actions needed                                   |
    | `has_message`                         | Boolean  | Whether record has messages                                |
    | `website_message_ids`                 | Array    | Website message identifiers                                |
    | `memo`                                | String   | Payment memo/notes                                         |
    | `display_name`                        | String   | Display name                                               |
    | `is_donation`                         | Boolean  | Whether payment is donation                                |
    | `is_sent`                             | Boolean  | Whether payment is sent                                    |
    | `country_code`                        | String   | Country code                                               |
    | `need_cancel_request`                 | Boolean  | Whether cancel request is needed                           |
    | `suitable_payment_token_ids`          | Array    | Suitable payment token identifiers                         |
    | `attachment_ids`                      | Array    | Attachment identifiers                                     |
    | `create_uid`                          | Integer  | Created by user identifier                                 |
    | `write_uid`                           | Integer  | Last updated by user identifier                            |
  </Accordion>

  <Accordion title="Insurance Quotation">
    Stream for retrieving insurance quotation records from Odoo's `mut.insurance.quotation` model. This stream contains insurance quotation data specific to your Odoo configuration.

    | Field                                 | Type     | Description                                                  |
    | :------------------------------------ | :------- | :----------------------------------------------------------- |
    | `id`                                  | Integer  | Unique identifier for the insurance quotation record         |
    | `name`                                | String   | Quotation/proposal number                                    |
    | `status`                              | String   | Quotation status                                             |
    | `create_date`                         | DateTime | Timestamp                                                    |
    | `write_date`                          | DateTime | Timestamp                                                    |
    | `display_name`                        | String   | Display name                                                 |
    | `access_token`                        | String   | External access token                                        |
    | `active`                              | Boolean  | Whether quotation is active                                  |
    | `validity_date`                       | DateTime | End of validity period                                       |
    | `standard_duration`                   | String   | Standard duration                                            |
    | `quotation_fields_readonly`           | Boolean  | Whether quotation fields are read-only                       |
    | `partner_id`                          | Integer  | Proponent identifier                                         |
    | `proponent_name`                      | String   | Proponent name                                               |
    | `proponent_type`                      | String   | Proponent type                                               |
    | `proponent_vat`                       | String   | CNPJ/CPF                                                     |
    | `proponent_legal_name`                | String   | Legal name/company name                                      |
    | `proponent_email`                     | String   | Email address                                                |
    | `proponent_phone`                     | String   | Phone number                                                 |
    | `proponent_age`                       | Integer  | Age                                                          |
    | `proponent_birth_date`                | DateTime | Birth date                                                   |
    | `proponent_gender`                    | String   | Gender                                                       |
    | `proponent_marital_status`            | String   | Marital status                                               |
    | `proponent_nationality`               | String   | Nationality                                                  |
    | `proponent_rg`                        | String   | RG (identity document)                                       |
    | `proponent_driver_license`            | String   | Driver's license (CNH)                                       |
    | `proponent_pep`                       | Boolean  | Whether principal driver is PEP (Politically Exposed Person) |
    | `proponent_address`                   | String   | Endereço                                                     |
    | `proponent_street_name`               | String   | Rua                                                          |
    | `proponent_street_number`             | String   | Número                                                       |
    | `proponent_street2`                   | String   | Complemento                                                  |
    | `proponent_district`                  | String   | Bairro                                                       |
    | `proponent_city`                      | String   | City                                                         |
    | `proponent_city_id`                   | Integer  | City identifier                                              |
    | `proponent_state_id`                  | Integer  | State identifier                                             |
    | `proponent_country_id`                | Integer  | Country identifier                                           |
    | `proponent_zip`                       | String   | ZIP code                                                     |
    | `proponent_zip_number`                | String   | ZIP code (numbers only)                                      |
    | `proponent_company_cnae`              | String   | Company CNAE                                                 |
    | `proponent_company_email`             | String   | Company email                                                |
    | `proponent_company_phone`             | String   | Company phone                                                |
    | `proponent_company_foundation_date`   | DateTime | Company foundation date                                      |
    | `proponent_legal_representative_name` | String   | Legal representative name                                    |
    | `proponent_legal_representative_vat`  | String   | Legal representative CPF                                     |
    | `product_id`                          | Integer  | Insurance product identifier                                 |
    | `item_ids`                            | Array    | Certificate/item identifiers                                 |
    | `items_display_name`                  | String   | Risk item display name                                       |
    | `items_value`                         | Number   | IS value (insured sum)                                       |
    | `items_total_premium_amount`          | Number   | Total premium amount for items                               |
    | `extra_product_ids`                   | Array    | Additional product identifiers                               |
    | `total_premium_amount`                | Number   | Total premium amount                                         |
    | `display_installments`                | Number   | Installment amount                                           |
    | `first_installment_amount`            | Number   | First installment amount                                     |
    | `installments_due_day`                | Integer  | Installment due day                                          |
    | `display_payment_term`                | String   | Payment term display                                         |
    | `factor`                              | Number   | Factor                                                       |
    | `payment_method_id`                   | Integer  | Payment method identifier                                    |
    | `payment_provider_id`                 | Integer  | Payment provider identifier                                  |
    | `payment_term_id`                     | Integer  | Payment term identifier                                      |
    | `available_payment_method_ids`        | Array    | Available payment method identifiers                         |
    | `available_payment_provider_ids`      | Array    | Available payment provider identifiers                       |
    | `discount_id`                         | Integer  | Discount identifier                                          |
    | `discount_status`                     | String   | Discount status                                              |
    | `is_enable_discount`                  | Boolean  | Whether discount is enabled                                  |
    | `enable_commissioning`                | Boolean  | Whether commissioning is enabled                             |
    | `json_commission_amounts`             | String   | Commission amounts (JSON)                                    |
    | `json_commission_rates`               | String   | Commission rates (JSON)                                      |
    | `is_renewal`                          | Boolean  | Whether quotation is renewal                                 |
    | `origin_policy_id`                    | Integer  | Origin policy identifier                                     |
    | `is_calc_done`                        | Boolean  | Whether calculation is done                                  |
    | `inspection_counter`                  | Integer  | Inspection counter                                           |
    | `user_id`                             | Integer  | Salesperson identifier                                       |
    | `sales_team_id`                       | Integer  | Sales team identifier                                        |
    | `company_id`                          | Integer  | Company identifier                                           |
    | `currency_id`                         | Integer  | Currency identifier                                          |
    | `activity_ids`                        | Array    | Activity identifiers                                         |
    | `activity_calendar_event_id`          | Integer  | Next activity calendar event identifier                      |
    | `activity_date_deadline`              | DateTime | Next activity deadline                                       |
    | `activity_state`                      | String   | Activity state                                               |
    | `activity_summary`                    | String   | Next activity summary                                        |
    | `activity_type_id`                    | Integer  | Next activity type identifier                                |
    | `activity_user_id`                    | Integer  | Responsible user identifier                                  |
    | `activity_exception_decoration`       | String   | Activity exception decoration                                |
    | `activity_exception_icon`             | String   | Activity exception icon                                      |
    | `activity_type_icon`                  | String   | Activity type icon                                           |
    | `my_activity_date_deadline`           | DateTime | My activity deadline                                         |
    | `message_ids`                         | Array    | Message identifiers                                          |
    | `message_follower_ids`                | Array    | Follower identifiers                                         |
    | `message_partner_ids`                 | Array    | Follower partner identifiers                                 |
    | `message_attachment_count`            | Integer  | Attachment count                                             |
    | `message_has_error`                   | Boolean  | Whether message has error                                    |
    | `message_has_error_counter`           | Integer  | Number of message errors                                     |
    | `message_has_sms_error`               | Boolean  | Whether message has SMS error                                |
    | `message_is_follower`                 | Boolean  | Whether user is follower                                     |
    | `message_needaction`                  | Boolean  | Whether action is needed                                     |
    | `message_needaction_counter`          | Integer  | Number of actions needed                                     |
    | `has_message`                         | Boolean  | Whether record has messages                                  |
    | `website_message_ids`                 | Array    | Website message identifiers                                  |
    | `create_uid`                          | Integer  | Created by user identifier                                   |
    | `write_uid`                           | Integer  | Last updated by user identifier                              |
  </Accordion>

  <Accordion title="Policy">
    Stream for retrieving policy records from Odoo's `mut.policy` model. Contains insurance policy data including proponent details, coverage, and payment information.

    | Field                                 | Type     | Description                        |
    | :------------------------------------ | :------- | :--------------------------------- |
    | `id`                                  | Integer  | Record ID                          |
    | `name`                                | String   | Name                               |
    | `display_name`                        | String   | Display Name                       |
    | `create_date`                         | DateTime | Timestamp                          |
    | `write_date`                          | DateTime | Timestamp                          |
    | `company_id`                          | Integer  | Company                            |
    | `partner_id`                          | Integer  | Proponente                         |
    | `quotation_id`                        | Integer  | Proposta de Origem                 |
    | `state`                               | String   | Status                             |
    | `proponent_type`                      | String   | Tipo (person/company)              |
    | `proponent_name`                      | String   | Nome                               |
    | `proponent_vat`                       | String   | CNPJ/CPF                           |
    | `proponent_rg`                        | String   | RG                                 |
    | `proponent_driver_license`            | String   | CNH                                |
    | `proponent_birth_date`                | DateTime | Data de Nascimento                 |
    | `proponent_age`                       | Integer  | Idade                              |
    | `proponent_address`                   | String   | Endereço completo                  |
    | `proponent_zip`                       | String   | CEP                                |
    | `proponent_zip_number`                | String   | CEP (apenas números)               |
    | `proponent_street_name`               | String   | Logradouro                         |
    | `proponent_street_number`             | String   | Número                             |
    | `proponent_street2`                   | String   | Complemento                        |
    | `proponent_district`                  | String   | Bairro                             |
    | `proponent_city_id`                   | Integer  | Cidade                             |
    | `proponent_city`                      | String   | Cidade                             |
    | `proponent_state_id`                  | Integer  | Estado                             |
    | `proponent_state`                     | String   | Estado                             |
    | `proponent_country_id`                | Integer  | País (ID)                          |
    | `proponent_email`                     | String   | E-mail                             |
    | `proponent_phone`                     | String   | Telefone                           |
    | `proponent_gender`                    | String   | Gênero                             |
    | `proponent_marital_status`            | String   | Estado Civil                       |
    | `proponent_nationality`               | String   | Nacionalidade                      |
    | `proponent_pep`                       | Boolean  | PEP (Pessoa Politicamente Exposta) |
    | `proponent_legal_name`                | String   | Razão Social                       |
    | `proponent_legal_representative_name` | String   | Responsável Legal                  |
    | `proponent_legal_representative_vat`  | String   | CPF do Responsável                 |
    | `proponent_company_cnae`              | String   | CNAE da Empresa                    |
    | `proponent_company_email`             | String   | E-mail da Empresa                  |
    | `proponent_company_phone`             | String   | Telefone da Empresa                |
    | `proponent_company_foundation_date`   | DateTime | Data de Fundação da Empresa        |
    | `standard_duration`                   | String   | Duração Padrão                     |
    | `policy_type`                         | String   | Tipo de Apólice                    |
    | `payment_before_activation`           | Boolean  | Pagamento antes da Ativação        |
    | `currency_id`                         | Integer  | Moeda                              |
    | `status`                              | String   | Status                             |
    | `effective_date`                      | DateTime | Data de Início da Vigência         |
    | `expiry_date`                         | DateTime | Data de Fim da Vigência            |
    | `issue_date`                          | DateTime | Data de Emissão                    |
    | `user_id`                             | Integer  | Vendedor                           |
    | `total_premium_amount`                | Number   | Valor do Prêmio Total              |
    | `first_installment_amount`            | Number   | Valor da Primeira Parcela          |
    | `items_total_premium_amount`          | Number   | Prêmio Total dos Itens             |
    | `display_payment_term`                | String   | Demonstrativo de Parcelas          |
    | `insurance_product_id`                | Integer  | Produto de Seguro                  |
    | `certificate_ids`                     | Array    | Certificados                       |
    | `extra_product_ids`                   | Array    | Produtos Adicionais                |
    | `payment_method_id`                   | Integer  | Forma de Pagamento                 |
    | `payment_provider_id`                 | Integer  | Método de Pagamento                |
    | `payment_term_id`                     | Integer  | Condição de Pagamento              |
    | `invoice_ids`                         | Array    | Faturas                            |
    | `inspection_ids`                      | Array    | Vistorias                          |
    | `next_invoice_date`                   | DateTime | Próxima Data de Fatura             |
    | `installments_due_day`                | Integer  | Dia de Vencimento das Parcelas     |
    | `first_installment_due_date`          | DateTime | Vencimento da Primeira Parcela     |
    | `is_payment_overdue`                  | Boolean  | Pagamento em Atraso                |
    | `inactive_by_overdue`                 | Boolean  | Inativo por Atraso                 |
    | `is_pending_cancellation`             | Boolean  | Cancelamento Pendente              |
    | `is_inspection_required`              | Boolean  | Vistoria Obrigatória               |
    | `issued_without_inspection`           | Boolean  | Emitido sem Vistoria               |
    | `is_accepted`                         | Boolean  | Aceito                             |
    | `has_first_account_paid`              | Boolean  | Primeira Parcela Paga              |
    | `is_legacy_policy`                    | Boolean  | Apólice Legada                     |
    | `is_renewal`                          | Boolean  | É Renovação                        |
    | `has_active_renewal`                  | Boolean  | Tem Renovação Ativa                |
    | `has_active_endorsement`              | Boolean  | Tem Endosso Ativo                  |
    | `commission_total_amount`             | Number   | Valor Total de Comissão            |
    | `commission_count`                    | Integer  | Quantidade de Comissões            |
    | `json_commission_rates`               | String   | Taxas de Comissão                  |
    | `json_commission_amounts`             | String   | Valores de Comissão                |
    | `enable_commissioning`                | Boolean  | Habilitar Comissionamento          |
    | `commission_ids`                      | Array    | Comissões                          |
    | `cancellation_reason_id`              | Integer  | Motivo de Cancelamento             |
    | `cancellation_refund_amount`          | Number   | Valor de Reembolso                 |
    | `certificates_display_name`           | String   | Nome dos Certificados              |
    | `certificates_item_value`             | Number   | Valor IS dos Certificados          |
    | `envelope_id`                         | Integer  | Envelope de Assinatura             |
    | `signer_ids`                          | Array    | Signatários                        |
    | `envelope_status`                     | String   | Status do Envelope                 |
    | `invoice_count`                       | Integer  | Quantidade de Faturas              |
    | `transaction_count`                   | Integer  | Quantidade de Transações           |
    | `sales_team_id`                       | Integer  | Equipe de Vendas                   |
    | `origin_policy_id`                    | Integer  | Apólice de Origem                  |
    | `deductible_type`                     | String   | Tipo de Franquia                   |
    | `overdue_state`                       | String   | Estado de Atraso                   |
    | `enable_overdue_rules`                | Boolean  | Habilitar Regras de Atraso         |
    | `factor`                              | Number   | Fator                              |
    | `next_endo_no`                        | Integer  | Próximo Número de Endosso          |
    | `endorsements_count`                  | Integer  | Quantidade de Endossos             |
    | `credit_notes_count`                  | Integer  | Quantidade de Notas de Crédito     |
    | `removed_certificate_ids`             | Array    | Certificados Removidos             |
    | `x_ebao_code`                         | String   | Código eBao                        |
    | `message_is_follower`                 | Boolean  | Message is follower                |
    | `message_follower_ids`                | Array    | Message follower identifiers       |
    | `message_partner_ids`                 | Array    | Message partner identifiers        |
    | `message_ids`                         | Array    | Message identifiers                |
    | `has_message`                         | Boolean  | Has message                        |
    | `message_needaction`                  | Boolean  | Message needaction                 |
    | `message_needaction_counter`          | Integer  | Message needaction counter         |
    | `message_has_error`                   | Boolean  | Message has error                  |
    | `message_has_error_counter`           | Integer  | Message has error counter          |
    | `message_attachment_count`            | Integer  | Message attachment count           |
    | `website_message_ids`                 | Array    | Website message identifiers        |
    | `message_has_sms_error`               | Boolean  | Message has sms error              |
    | `create_uid`                          | Integer  | Created by                         |
    | `write_uid`                           | Integer  | Last Updated by                    |
  </Accordion>

  <Accordion title="Policy Certificate">
    Stream for retrieving policy certificate records from Odoo's `mut.policy.certificate` model. Contains certificate (item) data per policy, including vehicle and coverage details.

    | Field                           | Type     | Description                                                          |
    | :------------------------------ | :------- | :------------------------------------------------------------------- |
    | `id`                            | Integer  | Record ID                                                            |
    | `name`                          | String   | Name                                                                 |
    | `display_name`                  | String   | Display Name                                                         |
    | `create_date`                   | DateTime | Timestamp                                                            |
    | `write_date`                    | DateTime | Timestamp                                                            |
    | `company_id`                    | Integer  | Company                                                              |
    | `policy_id`                     | Integer  | Apólice                                                              |
    | `state`                         | String   | Status                                                               |
    | `reference_month_id`            | Integer  | Mês de Referência (ID)                                               |
    | `reference_month`               | String   | Mês de Referência                                                    |
    | `vehicle_manufacturer_id`       | Integer  | Fabricante (ID)                                                      |
    | `vehicle_model_id`              | Integer  | Modelo (ID)                                                          |
    | `vehicle_model_value_id`        | Integer  | Versão do Modelo (ID)                                                |
    | `vehicle_type_by_object`        | String   | Tipo de Veículo por Objeto                                           |
    | `vehicle_manufacture_year`      | Integer  | Ano de Fabricação                                                    |
    | `vehicle_model_year`            | Integer  | Ano do Modelo                                                        |
    | `vehicle_fipe_code`             | String   | Código FIPE                                                          |
    | `vehicle_fipe_value`            | Number   | Valor FIPE                                                           |
    | `vehicle_plate`                 | String   | Placa                                                                |
    | `vehicle_plate_sanitized`       | String   | Placa (sem formatação)                                               |
    | `vehicle_chassis`               | String   | Chassi                                                               |
    | `vehicle_renavam`               | String   | RENAVAM                                                              |
    | `vehicle_color`                 | String   | Cor                                                                  |
    | `vehicle_uf_register`           | String   | UF de Registro                                                       |
    | `vehicle_fuel_type`             | String   | Tipo de Combustível                                                  |
    | `vehicle_municipality_register` | String   | Município de Registro                                                |
    | `vehicle_category`              | String   | Categoria do Veículo                                                 |
    | `vehicle_cc`                    | String   | Cilindradas (string; numeric values from Odoo are coerced to string) |
    | `vehicle_usage`                 | String   | Uso do Veículo                                                       |
    | `vehicle_zero_km`               | Boolean  | Zero KM                                                              |
    | `vehicle_armored`               | Boolean  | Blindado                                                             |
    | `vehicle_financed`              | Boolean  | Financiado                                                           |
    | `vehicle_installed_antitheft`   | Boolean  | Antifurto Instalado                                                  |
    | `vehicle_observations`          | String   | Observações do Veículo                                               |
    | `currency_id`                   | Integer  | Moeda                                                                |
    | `coverage_plan_id`              | Integer  | Plano de Cobertura (ID)                                              |
    | `coverage_ids`                  | Array    | Coberturas                                                           |
    | `insured_object_id`             | Integer  | Objeto Segurado (ID)                                                 |
    | `premium_amount`                | Number   | Valor do Prêmio                                                      |
    | `item_amount`                   | Number   | Valor do Item                                                        |
    | `policy_no`                     | String   | Número da Apólice                                                    |
    | `insurance_product_id`          | Integer  | Produto de Seguro (ID)                                               |
    | `effective_date`                | DateTime | Data de Início da Vigência                                           |
    | `expiry_date`                   | DateTime | Data de Fim da Vigência                                              |
    | `coverage_plan_coverages`       | String   | Coberturas do Plano                                                  |
    | `has_vehicle_tracker`           | Boolean  | Possui Rastreador                                                    |
    | `btn_search_plate_dummy`        | String   | Botão Buscar Placa (dummy)                                           |
    | `is_using_api`                  | Boolean  | Usando API                                                           |
    | `discount_factor`               | Number   | Fator de Desconto                                                    |
    | `removed_on_endorsement`        | Boolean  | Removido em Endosso                                                  |
    | `ui_dynamic_fields`             | String   | Campos Dinâmicos da UI                                               |
    | `x_ebao_policy_no`              | String   | Número da Apólice eBao                                               |
    | `x_ebao_proposal_no`            | String   | Número da Proposta eBao                                              |
    | `create_uid`                    | Integer  | Created by                                                           |
    | `write_uid`                     | Integer  | Last Updated by                                                      |
  </Accordion>

  <Accordion title="Certificate Coverage">
    Stream for retrieving certificate coverage records from Odoo's `mut.certificate.coverage` model. Contains coverage lines linked to policy certificates.

    | Field                         | Type     | Description                  |
    | :---------------------------- | :------- | :--------------------------- |
    | `id`                          | Integer  | Record ID                    |
    | `name`                        | String   | Name                         |
    | `display_name`                | String   | Display Name                 |
    | `code`                        | String   | Código                       |
    | `create_date`                 | DateTime | Timestamp                    |
    | `write_date`                  | DateTime | Timestamp                    |
    | `company_id`                  | Integer  | Company                      |
    | `certificate_id`              | Integer  | Certificado                  |
    | `coverage_id`                 | Integer  | Cobertura (ID)               |
    | `state`                       | String   | Status                       |
    | `coverage_type`               | String   | Tipo de Cobertura            |
    | `image`                       | String   | Imagem                       |
    | `image_url`                   | String   | URL da Imagem                |
    | `has_deductible`              | Boolean  | Possui Franquia              |
    | `deductible_type`             | String   | Tipo de Franquia             |
    | `limit_type`                  | String   | Tipo de Limite               |
    | `required_inspection`         | Boolean  | Vistoria Obrigatória         |
    | `description`                 | String   | Descrição                    |
    | `premium_amount`              | Number   | Valor do Prêmio              |
    | `deductible_amount`           | Number   | Valor da Franquia            |
    | `sum_insured`                 | Number   | Soma Segurada                |
    | `deductible_name`             | String   | Nome da Franquia             |
    | `max_compensation_limit`      | Number   | Limite Máximo de Indenização |
    | `coparticipation_description` | String   | Descrição da Coparticipação  |
    | `message_is_follower`         | Boolean  | Message is follower          |
    | `message_follower_ids`        | Array    | Message follower identifiers |
    | `message_partner_ids`         | Array    | Message partner identifiers  |
    | `message_ids`                 | Array    | Message identifiers          |
    | `has_message`                 | Boolean  | Has message                  |
    | `message_needaction`          | Boolean  | Message needaction           |
    | `message_needaction_counter`  | Integer  | Message needaction counter   |
    | `message_has_error`           | Boolean  | Message has error            |
    | `message_has_error_counter`   | Integer  | Message has error counter    |
    | `message_attachment_count`    | Integer  | Message attachment count     |
    | `website_message_ids`         | Array    | Website message identifiers  |
    | `message_has_sms_error`       | Boolean  | Message has sms error        |
    | `currency_id`                 | Integer  | Moeda                        |
    | `create_uid`                  | Integer  | Created by                   |
    | `write_uid`                   | Integer  | Last Updated by              |
  </Accordion>

  <Accordion title="Insurance Item Coverage">
    Stream for retrieving insurance item coverage records from Odoo's `mut.insurance.item.coverage` model.

    | Field                         | Type     | Description                        |
    | :---------------------------- | :------- | :--------------------------------- |
    | `id`                          | Integer  | Record ID                          |
    | `display_name`                | String   | Display Name                       |
    | `name`                        | String   | Name                               |
    | `code`                        | String   | Código                             |
    | `create_date`                 | DateTime | Created on                         |
    | `write_date`                  | DateTime | Last Updated on                    |
    | `create_uid`                  | Integer  | Created by                         |
    | `write_uid`                   | Integer  | Last Updated by                    |
    | `company_id`                  | Integer  | Company                            |
    | `item_id`                     | Integer  | Item de Seguro                     |
    | `coverage_plan_id`            | Integer  | Plano de Cobertura                 |
    | `field_id`                    | Integer  | Campo                              |
    | `coverage_type`               | String   | Tipo de Cobertura                  |
    | `image`                       | String   | Imagem                             |
    | `image_url`                   | String   | URL da Imagem                      |
    | `has_deductible`              | Boolean  | Possui Franquia                    |
    | `deductible_type`             | String   | Tipo de Franquia                   |
    | `limit_type`                  | String   | Tipo de Limite                     |
    | `required_inspection`         | Boolean  | Vistoria Obrigatória               |
    | `message_is_follower`         | Boolean  | Is Follower                        |
    | `message_follower_ids`        | Array    | Followers                          |
    | `message_partner_ids`         | Array    | Followers (Partners)               |
    | `message_ids`                 | Array    | Messages                           |
    | `has_message`                 | Boolean  | Has Message                        |
    | `message_needaction`          | Boolean  | Action Needed                      |
    | `message_needaction_counter`  | Integer  | Number of Actions                  |
    | `message_has_error`           | Boolean  | Message Delivery error             |
    | `message_has_error_counter`   | Integer  | Number of errors                   |
    | `message_attachment_count`    | Integer  | Attachment Count                   |
    | `website_message_ids`         | Array    | Website Messages                   |
    | `message_has_sms_error`       | Boolean  | SMS Delivery error                 |
    | `currency_id`                 | Integer  | Moeda                              |
    | `description`                 | String   | Descrição                          |
    | `premium_amount`              | Number   | Valor do Prêmio                    |
    | `sum_insured`                 | Number   | Soma Segurada                      |
    | `deductible_amount`           | Number   | Valor da Franquia                  |
    | `deductible_name`             | String   | Nome da Franquia                   |
    | `max_compensation_limit`      | Number   | Limite Máximo de Indenização       |
    | `coparticipation_description` | String   | Descrição da Coparticipação        |
    | `base_value_override_calc`    | Boolean  | Sobrescrever Cálculo do Valor Base |
  </Accordion>

  <Accordion title="Policy Extra Product">
    Stream for retrieving policy extra product records from Odoo's `mut.policy.extra.product` model.

    | Field                            | Type     | Description                        |
    | :------------------------------- | :------- | :--------------------------------- |
    | `id`                             | Integer  | Record ID                          |
    | `display_name`                   | String   | Display Name                       |
    | `create_date`                    | DateTime | Created on                         |
    | `write_date`                     | DateTime | Last Updated on                    |
    | `create_uid`                     | Integer  | Created by                         |
    | `write_uid`                      | Integer  | Last Updated by                    |
    | `company_id`                     | Integer  | Company                            |
    | `policy_id`                      | Integer  | Apólice                            |
    | `product_id`                     | Integer  | Produto                            |
    | `name`                           | String   | Name                               |
    | `sequence`                       | Integer  | Sequência                          |
    | `qty`                            | Number   | Quantidade                         |
    | `currency_id`                    | Integer  | Moeda                              |
    | `default_price`                  | Number   | Preço Padrão                       |
    | `price_unit_kind`                | String   | Tipo de Preço Unitário             |
    | `percent_price_base`             | String   | Base de Cálculo do Percentual      |
    | `charge_kind`                    | String   | Tipo de Cobrança                   |
    | `is_mandatory`                   | Boolean  | Obrigatório                        |
    | `allow_negotiation`              | String   | Permitir Negociação                |
    | `min_amount`                     | Number   | Valor Mínimo                       |
    | `max_amount`                     | Number   | Valor Máximo                       |
    | `apply_prorata`                  | Boolean  | Aplicar Pró-rata                   |
    | `price_unit`                     | Number   | Preço Unitário                     |
    | `price_subtotal`                 | Number   | Subtotal                           |
    | `is_recurring`                   | Boolean  | Recorrente                         |
    | `is_recurring_label`             | String   | Label Recorrente                   |
    | `can_be_deleted`                 | Boolean  | Pode ser Excluído                  |
    | `apply_fixed_price_on_base_calc` | Boolean  | Aplicar Preço Fixo no Cálculo Base |
    | `is_commissionable`              | Boolean  | Comissionável                      |
    | `json_commission_amounts`        | String   | Valores de Comissão                |
  </Accordion>
</AccordionGroup>

# Data Model

The following diagram illustrates the relationships between the data streams in Odoo. Each stream represents a distinct Odoo model and operates independently.

```mermaid theme={null}
graph TD;
    subgraph "Odoo Streams"
        Payment("Payment");
        InsuranceQuotation("Insurance Quotation");
        Policy("Policy");
        PolicyCertificate("Policy Certificate");
        CertificateCoverage("Certificate Coverage");
        InsuranceItemCoverage("Insurance Item Coverage");
        PolicyExtraProduct("Policy Extra Product");
    end

    subgraph "Odoo ERP System"
        OdooAPI("Odoo API");
    end

    Payment --> OdooAPI;
    InsuranceQuotation --> OdooAPI;
    Policy --> OdooAPI;
    PolicyCertificate --> OdooAPI;
    CertificateCoverage --> OdooAPI;
    InsuranceItemCoverage --> OdooAPI;
    PolicyExtraProduct --> OdooAPI;
```

# Use Cases for Data Analysis

This guide outlines valuable business intelligence use cases when consolidating Odoo data, along with ready-to-use SQL queries that you can run on [Explorer](https://app.nekt.ai/explorer).

### 1. Payment Analysis Overview

Track payment transactions, analyze payment patterns, and monitor financial flows from your Odoo system.

**Business Value:**

* Monitor payment transactions and cash flow
* Analyze payment methods and patterns
* Track outstanding payments and reconciliation status
* Generate financial reports based on payment data

<Accordion title="SQL query">
  <Tabs>
    <Tab title="AWS">
      ```sql theme={null}
      SELECT
         DATE(payment_date) AS payment_date,
         payment_method,
         state,
         currency_id,
         SUM(amount) AS total_amount,
         COUNT(*) AS payment_count,
         COUNT(DISTINCT partner_id) AS unique_partners
      FROM
         nekt_raw.odoo_payment
      WHERE
         payment_date >= CURRENT_DATE - INTERVAL '30' DAY
      GROUP BY
         DATE(payment_date),
         payment_method,
         state,
         currency_id
      ORDER BY
         payment_date DESC,
         total_amount DESC
      ```
    </Tab>

    <Tab title="GCP">
      ```sql theme={null}
      SELECT
         DATE(payment_date) AS payment_date,
         payment_method,
         state,
         currency_id,
         SUM(amount) AS total_amount,
         COUNT(*) AS payment_count,
         COUNT(DISTINCT partner_id) AS unique_partners
      FROM
         `nekt_raw.odoo_payment`
      WHERE
         DATE(payment_date) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
      GROUP BY
         DATE(payment_date),
         payment_method,
         state,
         currency_id
      ORDER BY
         payment_date DESC,
         total_amount DESC
      ```
    </Tab>
  </Tabs>
</Accordion>

### 2. Insurance Quotation Tracking

Analyze insurance quotation trends, conversion rates, and customer behavior patterns.

**Business Value:**

* Track quotation creation and conversion rates
* Identify trends in quotation volume over time
* Analyze customer segments and quotation performance
* Monitor quotation status and workflow progression

<Accordion title="SQL query">
  <Tabs>
    <Tab title="AWS">
      ```sql theme={null}
      SELECT
         DATE(create_date) AS quotation_date,
         state,
         product_id,
         COUNT(*) AS quotation_count,
         COUNT(DISTINCT partner_id) AS unique_customers,
         AVG(amount_total) AS avg_quotation_value,
         SUM(CASE WHEN state = 'sale' THEN 1 ELSE 0 END) AS converted_count,
         ROUND(
            SUM(CASE WHEN state = 'sale' THEN 1 ELSE 0 END)::NUMERIC / 
            NULLIF(COUNT(*), 0) * 100, 
            2
         ) AS conversion_rate_percent
      FROM
         nekt_raw.odoo_insurance_quotation
      WHERE
         create_date >= CURRENT_DATE - INTERVAL '30' DAY
      GROUP BY
         DATE(create_date),
         state,
         product_id
      ORDER BY
         quotation_date DESC,
         quotation_count DESC
      ```
    </Tab>

    <Tab title="GCP">
      ```sql theme={null}
      SELECT
         DATE(create_date) AS quotation_date,
         state,
         product_id,
         COUNT(*) AS quotation_count,
         COUNT(DISTINCT partner_id) AS unique_customers,
         AVG(amount_total) AS avg_quotation_value,
         SUM(CASE WHEN state = 'sale' THEN 1 ELSE 0 END) AS converted_count,
         ROUND(
            SAFE_DIVIDE(
               SUM(CASE WHEN state = 'sale' THEN 1 ELSE 0 END),
               COUNT(*)
            ) * 100,
            2
         ) AS conversion_rate_percent
      FROM
         `nekt_raw.odoo_insurance_quotation`
      WHERE
         DATE(create_date) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
      GROUP BY
         DATE(create_date),
         state,
         product_id
      ORDER BY
         quotation_date DESC,
         quotation_count DESC
      ```
    </Tab>
  </Tabs>
</Accordion>

## Implementation Notes

### Dynamic Schema Discovery

* The Odoo connector uses dynamic schema discovery by calling the `fields_get` method on each Odoo model
* This means the exact fields available may vary based on:
  * Your Odoo version
  * Installed modules and apps
  * Custom fields and configurations
  * Model-specific customizations
* If schema discovery fails, the connector falls back to a basic schema with only the `id` field

### Data Quality Considerations

* Odoo model fields may include relationships (many2one, one2many, many2many) that are represented as integer IDs or arrays
* Date and datetime fields are automatically converted to appropriate types
* Monetary fields are handled as numeric types
* Binary fields are represented as strings
* Fields defined as string in the stream schema (e.g. `vehicle_cc`) are coerced from numeric values (e.g. `0`) to string when the API returns numbers, so targets receive schema-compliant types

### API Limits & Performance

* The connector uses pagination with a default page size to efficiently extract large datasets
* For faster extractions, select only the streams necessary for your analysis
* Odoo API rate limits may apply depending on your instance configuration
* Ensure your API key has appropriate read permissions for the models you want to extract

### Multi-Database Support

* If your Odoo instance hosts multiple databases, specify the database name in the configuration
* The database name is sent as the `X-Odoo-Database` header in API requests
* Leave the database field empty if your instance uses a single database or auto-detection

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download Odoo skills file" icon="wand-magic-sparkles" href="/sources/odoo.md">
  Odoo connector documentation as plain markdown, for use in AI agent contexts.
</Card>
