Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions ai_oca_bridge_project/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
=====================
AI OCA Bridge Project
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7db759bf0f80da243772d180303cb0e39243db662bf554ee4adbe340d61c2d92
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fai-lightgray.png?logo=github
:target: https://github.com/OCA/ai/tree/16.0/ai_oca_bridge_project
:alt: OCA/ai
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/ai-16-0/ai-16-0-ai_oca_bridge_project
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/ai&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module is intended to allow external AI systems to perform actions
with the correct context, based on triggers related to Project
management.

**Table of contents**

.. contents::
:local:

Configuration
=============

- **Bridge with ``Usage = "AI Thread Create"``** Processes new projects
and tasks in the external system for AI-enhanced actions like project
analysis, task prioritization, or automated project management.

- **Bridge with ``Usage = "AI Thread Write"``** Updates project and task
information in the external system when they are modified in Odoo.

- **Bridge with ``Usage = "AI Thread Unlink"``** Removes project and
task data from the external system when they are deleted from Odoo.

For creating those bridges, apart from the usage of the bridge, the user
must define:

- Payload Type: it depends on the endpoint configuration, normally
"Record" would work.
- Result Type: depending on your use case.
- Model: select the "Project" or "Task" model
- Field: add at least the fields the endpoint is expecting (e.g., name,
description, stage, assignees, etc.).
- Filter: add a domain for using the bridge only with the projects/tasks
intended to trigger automatic actions

Usage
=====

Depending on the bridges you have created, create, update or delete a
project or task record matching the bridge domain. You should see the
execution on the AI Bridge Execution menu.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/ai/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/ai/issues/new?body=module:%20ai_oca_bridge_project%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Escodoo

Contributors
------------

- `Escodoo <https://www.escodoo.com.br>`__:

- Marcel Savegnago <marcel.savegnago@escodoo.com.br>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px
:target: https://github.com/marcelsavegnago
:alt: marcelsavegnago

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-marcelsavegnago|

This module is part of the `OCA/ai <https://github.com/OCA/ai/tree/16.0/ai_oca_bridge_project>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions ai_oca_bridge_project/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions ai_oca_bridge_project/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2025 Escodoo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "AI OCA Bridge Project",
"summary": """Adds Project triggers for AI Bridges""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Escodoo,Odoo Community Association (OCA)",
"maintainers": ["marcelsavegnago"],
"category": "AI",
"website": "https://github.com/OCA/ai",
"depends": [
"ai_oca_bridge",
"project",
],
"data": [],
"demo": [
"demo/ai_bridge_demo.xml",
],
}
114 changes: 114 additions & 0 deletions ai_oca_bridge_project/demo/ai_bridge_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="ai_bridge_project_create" model="ai.bridge">
<field name="name">Project AI Bridge - Create</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a new project is created.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_project" />
<field name="usage">ai_thread_create</field>
<field name="url">https://api.example.com/ai/project/create</field>
<field name="auth_type">none</field>
<field name="payload_type">record</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
<field
name="field_ids"
eval="[(6, 0, [ref('project.field_project_project__name'), ref('project.field_project_project__stage_id')])]"
/>
</record>

<record id="ai_bridge_project_write" model="ai.bridge">
<field name="name">Project AI Bridge - Update</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a project is updated.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_project" />
<field name="usage">ai_thread_write</field>
<field name="url">https://api.example.com/ai/project/update</field>
<field name="auth_type">none</field>
<field name="payload_type">record</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
<field
name="field_ids"
eval="[(6, 0, [ref('project.field_project_project__name'), ref('project.field_project_project__stage_id')])]"
/>
</record>

<record id="ai_bridge_project_unlink" model="ai.bridge">
<field name="name">Project AI Bridge - Delete</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a project is deleted.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_project" />
<field name="usage">ai_thread_unlink</field>
<field name="url">https://api.example.com/ai/project/delete</field>
<field name="auth_type">none</field>
<field name="payload_type">none</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
</record>

<record id="ai_bridge_task_create" model="ai.bridge">
<field name="name">Task AI Bridge - Create</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a new task is created.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_task" />
<field name="usage">ai_thread_create</field>
<field name="url">https://api.example.com/ai/task/create</field>
<field name="auth_type">none</field>
<field name="payload_type">record</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
<field
name="field_ids"
eval="[(6, 0, [ref('project.field_project_task__name'), ref('project.field_project_task__stage_id')])]"
/>
</record>

<record id="ai_bridge_task_write" model="ai.bridge">
<field name="name">Task AI Bridge - Update</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a task is updated.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_task" />
<field name="usage">ai_thread_write</field>
<field name="url">https://api.example.com/ai/task/update</field>
<field name="auth_type">none</field>
<field name="payload_type">record</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
<field
name="field_ids"
eval="[(6, 0, [ref('project.field_project_task__name'), ref('project.field_project_task__stage_id')])]"
/>
</record>

<record id="ai_bridge_task_unlink" model="ai.bridge">
<field name="name">Task AI Bridge - Delete</field>
<field name="description">
<![CDATA[
<p>This AI bridge is triggered when a task is deleted.</p>
]]>
</field>
<field name="model_id" ref="project.model_project_task" />
<field name="usage">ai_thread_unlink</field>
<field name="url">https://api.example.com/ai/task/delete</field>
<field name="auth_type">none</field>
<field name="payload_type">none</field>
<field name="result_type">none</field>
<field name="result_kind">immediate</field>
</record>
</odoo>
2 changes: 2 additions & 0 deletions ai_oca_bridge_project/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import project_project
from . import project_task
6 changes: 6 additions & 0 deletions ai_oca_bridge_project/models/project_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from odoo import models


class ProjectProject(models.Model):
_inherit = ["project.project", "ai.bridge.thread"]
_name = "project.project"
6 changes: 6 additions & 0 deletions ai_oca_bridge_project/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from odoo import models


class ProjectTask(models.Model):
_inherit = ["project.task", "ai.bridge.thread"]
_name = "project.task"
15 changes: 15 additions & 0 deletions ai_oca_bridge_project/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- **Bridge with `Usage = "AI Thread Create"`**
Processes new projects and tasks in the external system for AI-enhanced actions like project analysis, task prioritization, or automated project management.

- **Bridge with `Usage = "AI Thread Write"`**
Updates project and task information in the external system when they are modified in Odoo.

- **Bridge with `Usage = "AI Thread Unlink"`**
Removes project and task data from the external system when they are deleted from Odoo.

For creating those bridges, apart from the usage of the bridge, the user must define:
- Payload Type: it depends on the endpoint configuration, normally "Record" would work.
- Result Type: depending on your use case.
- Model: select the "Project" or "Task" model
- Field: add at least the fields the endpoint is expecting (e.g., name, description, stage, assignees, etc.).
- Filter: add a domain for using the bridge only with the projects/tasks intended to trigger automatic actions
2 changes: 2 additions & 0 deletions ai_oca_bridge_project/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Escodoo](https://www.escodoo.com.br):
- Marcel Savegnago \<marcel.savegnago@escodoo.com.br\>
1 change: 1 addition & 0 deletions ai_oca_bridge_project/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module is intended to allow external AI systems to perform actions with the correct context, based on triggers related to Project management.
1 change: 1 addition & 0 deletions ai_oca_bridge_project/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Depending on the bridges you have created, create, update or delete a project or task record matching the bridge domain. You should see the execution on the AI Bridge Execution menu.
Binary file added ai_oca_bridge_project/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading