diff --git a/ai_oca_bridge/README.rst b/ai_oca_bridge/README.rst index b196324..1e5262e 100644 --- a/ai_oca_bridge/README.rst +++ b/ai_oca_bridge/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ============= AI OCA Bridge ============= @@ -17,7 +13,7 @@ AI OCA Bridge .. |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/license-AGPL--3-blue.png +.. |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 @@ -187,6 +183,10 @@ Contributors - Valentín Vinagre +- `Binhex `__ + + - Adria Hortoneda + Maintainers ----------- diff --git a/ai_oca_bridge/models/ai_bridge.py b/ai_oca_bridge/models/ai_bridge.py index e520a49..e6839b2 100644 --- a/ai_oca_bridge/models/ai_bridge.py +++ b/ai_oca_bridge/models/ai_bridge.py @@ -44,7 +44,8 @@ class AiBridge(models.Model): user_id = fields.Many2one( "res.users", default=lambda self: self.env.user, - help="The user that will be shown when executing this AI bridge.", + required=True, + help="The user who execute the bridge.", ) payload_type = fields.Selection( [ diff --git a/ai_oca_bridge/models/ai_bridge_execution.py b/ai_oca_bridge/models/ai_bridge_execution.py index 1e2e342..48dd94b 100644 --- a/ai_oca_bridge/models/ai_bridge_execution.py +++ b/ai_oca_bridge/models/ai_bridge_execution.py @@ -204,7 +204,7 @@ def _process_response_none(self, response): return {} def _process_response_message(self, response): - return {"id": self._get_channel().message_post(**response).id} + return {"id": self._get_channel().sudo().message_post(**response).id} def _process_response_action(self, response): if response.get("action"): diff --git a/ai_oca_bridge/readme/CONTRIBUTORS.md b/ai_oca_bridge/readme/CONTRIBUTORS.md index 7a0afbb..a12c579 100644 --- a/ai_oca_bridge/readme/CONTRIBUTORS.md +++ b/ai_oca_bridge/readme/CONTRIBUTORS.md @@ -5,4 +5,7 @@ - [Sygel Technology](https://www.sygel.es) - Valentín Vinagre - \ No newline at end of file + +- [Binhex](https://www.binhex.cloud/) + + - Adria Hortoneda diff --git a/ai_oca_bridge/static/description/index.html b/ai_oca_bridge/static/description/index.html index 255a869..cf4441e 100644 --- a/ai_oca_bridge/static/description/index.html +++ b/ai_oca_bridge/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +AI OCA Bridge -
+
+

AI OCA Bridge

- - -Odoo Community Association - -
-

AI OCA Bridge

-

Beta License: AGPL-3 OCA/ai Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/ai Translate me on Weblate Try me on Runboat

This module is used to create a bridge between Odoo and other AI systems like n8n.

Table of contents

@@ -409,7 +404,7 @@

AI OCA Bridge

-

Use Cases / Context

+

Use Cases / Context

Right now, there are 2 different approaches for AI integration with Odoo:

    @@ -430,17 +425,17 @@

    Use Cases / Context

    be used as Bridge with AI systems.

-

Configuration

+

Configuration

As an administrator access AI Bridge\AI Bridge.

Create a new bridge. Define the name, model, url and configuration.

In order to improve the view of the AI configuration, use groups and domain to set better filters.

-

Payload Configuration

+

Payload Configuration

On the external system, you will receive a POST payload. The data included will be the following:

-

General

+

General

  • _odoo: Standard data to identify the Odoo Database
  • _model: Model of the related object
  • @@ -449,16 +444,16 @@

    General

-

Record Payload

+

Record Payload

Adds a new item called record with all the fields.

-

Record Payload (v0)

+

Record Payload (v0)

Adds all the fields directly on the payload. It will be removed on 17.0.

-

Asynchronous and synchronous calls

+

Asynchronous and synchronous calls

The new system allows asynchronous and synchronous calls. Asynchronous calls makes sense when the task to be processed don’t need to be immediate. For example, reviewing an invoice and leave a comment with @@ -473,21 +468,21 @@

Asynchronous and synchronous call automatically on the synchronous call.

-

Result processing

+

Result processing

With the answers of the system we expect to do something about it. We have the following options:

-

No processing

+

No processing

In this case, the result will do nothing

-

Post a Message

+

Post a Message

We will post a message on the original thread of the system. The thread is computed by a function, so it can be overriden in future modules. It expects the keyword arguments of the message_post function.

-

Action

+

Action

It expects to launch an action on the user interface. It only makes sense on synchronous calls.

It expects an action item with the following parameters:

@@ -500,12 +495,12 @@

Action

-

Usage

+

Usage

Use the bolt widget in the chatter to execute the different AI options.

The options will be filtered according to the configuration.

-

Known issues / Roadmap

+

Known issues / Roadmap

  • Define examples to use and import
  • Allow child fields. Right now, only first level fields are accepted.
  • @@ -513,7 +508,7 @@

    Known issues / Roadmap

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -521,15 +516,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Dixmit
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -555,6 +554,5 @@

Maintainers

-
diff --git a/ai_oca_bridge/views/ai_bridge.xml b/ai_oca_bridge/views/ai_bridge.xml index a60ef4a..190136b 100644 --- a/ai_oca_bridge/views/ai_bridge.xml +++ b/ai_oca_bridge/views/ai_bridge.xml @@ -29,6 +29,7 @@ attrs="{'invisible': [('result_kind', '!=', 'async')]}" /> +