Repository
OCA/ai · module folder · Try on Runboat
Module version
2.0.1
Category
AI
Folder size
0.29 MB
License
AGPL-3
Application
Yes
Auto-installable
No
Website
https://github.com/OCA/ai
Last tracking update
2026-08-07 08:43:00
Authors
Odoo Community Association (OCA), Dixmit
Maintainers
Odoo Community Association (OCA), Dixmit
Committers
Enric Tobella, Weblate, OCA-git-bot, oca-ci, Luis Rodriguez, Simon Dovicovic
Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
ai_oca_bridge_chatter, ai_oca_bridge_document_page, ai_oca_bridge_extra_parameters
Description
This module is used to create a bridge between Odoo and other AI systems like n8n.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
ai_bridge_execution_form_view ai.bridge.execution form New
ai_bridge_execution_search_view ai.bridge.execution search New
ai_bridge_execution_tree_view ai.bridge.execution list New
ai_bridge_form_view ai.bridge form New
ai_bridge_search_view ai.bridge search New
ai_bridge_tree_view ai.bridge list New
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/ai/response/<int:execution_id>/<string:token> AIController.ai_process_response public http ALL csrf off sudo
Models touched (5)

New fields (25)
  • active Boolean
    default=True
  • async_timeout Integer
    default=300 help='Timeout in seconds for asynchronous operations. If the operation does not complete within this time, it will be considered failed.'
  • auth_password Char
    groups='base.group_system'
  • auth_token Char
    groups='base.group_system'
  • auth_type Selection
    default='none' help='The type of authentication used to connect to the external AI system.' selection=[('none', 'None'), ('basic', 'Basic Authentication'), ('token', 'Token Authentication')] string='Authentication Type'
  • auth_username Char
    groups='base.group_system'
  • company_id Many2one → res.company
    args: 'res.company'
  • description Html
    translate=True
  • domain Char
    compute='_compute_domain' readonly=False store=True string='Filter'
  • execution_count Integer
    compute='_compute_execution_count'
  • execution_ids One2many → ai.bridge.execution
    args: 'ai.bridge.execution', 'ai_bridge_id'
  • field_ids Many2many → ir.model.fields
    compute='_compute_field_ids' help='Fields to include in the AI bridge.' readonly=False store=True args: 'ir.model.fields'
  • group_ids Many2many → res.groups
    help='User groups allowed to use this AI bridge.' args: 'res.groups'
  • model Char
    related='model_id.model' string='Model Name'
  • model_id Many2one → ir.model
    help='The model to which this bridge is associated.' ondelete='cascade' required=False string='Model' args: 'ir.model'
  • model_required Boolean
    compute='_compute_model_fields'
  • name Char
    required=True translate=True
  • payload_type Selection
    default='record' required=True args: [('none', 'No payload'), ('record', 'Record')]
  • result_kind Selection
    default='immediate' help="\n Defines how the result from the AI system is processed.\n - 'Immediate': The result is processed immediately after the AI system responds.\n - 'Asynchronous': The result is processed in the background.\n It allows longer operations.\n Odoo will provide a URL to the AI system where the response will be sent.\n Users will receive a notification when the operation is started.\n No notification will be sent when it is finished.\n " args: [('immediate', 'Immediate'), ('async', 'Asynchronous')]
  • result_type Selection
    default='none' help='Defines the type of result expected from the AI system.' required=True args: [('none', 'No processing'), ('message', 'Post a Message'), ('action', 'Action')]
  • sample_payload Text
    compute='_compute_sample_payload' help='Sample payload to be sent to the AI system. This is used for testing and debugging purposes.'
  • sequence Integer
    default=10
  • url Char
    help='The URL of the external AI system to which this bridge connects.' string='URL'
  • usage Selection
    default='none' help="Defines how this bridge is used. If 'Thread', it will be used in the mail thread context." args: [('none', 'None'), ('thread', 'Thread'), ('ai_thread_create', 'On Record Created'), ('ai_thread_write', 'On Record Updated'), ('ai_thread_unlink', 'On Record Deleted')]
  • user_id Many2one → res.users
    default=<expr> help='The user that will be shown when executing this AI bridge.' args: 'res.users'
Public methods (2)
  • custom_serializer(self, obj)
  • execute_ai_bridge(self, res_model, res_id)

New fields (11)
  • ai_bridge_id Many2one → ai.bridge
    ondelete='cascade' required=True args: 'ai.bridge'
  • company_id Many2one → res.company
    compute='_compute_company_id' readonly=True store=True args: 'res.company'
  • error Text
    readonly=True
  • expiration_date Datetime
    help='Expiration date for the async operation token.' readonly=True
  • model_id Many2one → ir.model
    ondelete='cascade' required=False args: 'ir.model'
  • name Char
    compute='_compute_name' store=True
  • payload Json
    readonly=True
  • payload_txt Text
    compute='_compute_payload_txt'
  • res_id Integer
    required=False
  • result Text
    readonly=True
  • state Selection
    default='draft' required=True args: [('draft', 'Draft'), ('done', 'Done'), ('error', 'Error')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (1)
  • ai_bridge_info Json
    compute='_compute_ai_bridge_info' store=False
Public methods (1)
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
16 days ago
Last activity
1 day ago
Repository
OCA/ai
Pull request
[19.0][MIG] ai_oca_bridge: Migration to 19.0 (#95)