125 lines
5.5 KiB
Python
125 lines
5.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
{
|
|
'name': 'DN AI',
|
|
'version': '20.0.1.0.0',
|
|
'category': 'Productivity/AI',
|
|
'summary': 'Open-source AI assistant for Odoo Community — agents, skills, tools, agentic loop (LGPL-3)',
|
|
'description': """
|
|
DN AI
|
|
=====
|
|
|
|
An open-source re-implementation of the Odoo Enterprise AI assistant for
|
|
Odoo 20 Community.
|
|
|
|
Core capabilities
|
|
-----------------
|
|
* **Agents** — configurable assistants with a system prompt and skills.
|
|
* **Skills** — bundles of instructions plus tools that teach the assistant a
|
|
workflow (search the database, create/update records, navigate the UI, ...).
|
|
* **Tools** — any server action can be exposed to the model with a name,
|
|
description and JSON schema. 20 built-in tools ship with the module.
|
|
* **Agentic loop** — a resumable, persisted state machine that keeps calling
|
|
the model, executes tool calls, pauses for user confirmation or answers, and
|
|
streams progress back into the chat.
|
|
* **Chat panel** — a dedicated ``AI Chat`` client action, and the same
|
|
conversation is listed in Discuss (its ``ai_chat`` channel type is registered
|
|
with the mail store) so the transcript is stored as regular messages.
|
|
* **Attachments** — pick, paste or drag files into the chat. Text, CSV, Word,
|
|
Excel, PowerPoint and OpenDocument files are parsed server-side (standard
|
|
library only); images and PDFs are sent as multimodal content when the
|
|
provider supports vision.
|
|
* **Provider layer** — DeepSeek and Alibaba Qwen out of the box, plus any
|
|
OpenAI-compatible endpoint (Ollama, vLLM, ...). No IAP credits required.
|
|
|
|
Not yet implemented (planned for phase 2): knowledge sources / RAG, and the
|
|
per-business-app extension modules.
|
|
|
|
License: LGPL-3. No Odoo Enterprise source code is used, copied or derived.
|
|
""",
|
|
'author': 'DN Community',
|
|
'website': '',
|
|
'license': 'LGPL-3',
|
|
'application': True,
|
|
'installable': True,
|
|
'auto_install': False,
|
|
'depends': [
|
|
'mail',
|
|
'base_setup',
|
|
],
|
|
'external_dependencies': {
|
|
# PyMuPDF is optional: it only powers local PDF text extraction when a
|
|
# provider has neither a Files API nor vision. The importer degrades
|
|
# gracefully when it is absent, so do not make it a hard requirement.
|
|
'python': [],
|
|
},
|
|
'data': [
|
|
# ---- security first
|
|
'security/ai_security.xml',
|
|
'security/ir.access.csv',
|
|
|
|
# ---- views
|
|
'views/ai_agent_views.xml',
|
|
'views/ai_skill_views.xml',
|
|
'views/ai_tool_views.xml',
|
|
'views/ai_composer_views.xml',
|
|
'views/ai_prompt_button_views.xml',
|
|
'views/templates.xml',
|
|
'views/res_config_settings_views.xml',
|
|
'views/ai_menus.xml',
|
|
|
|
# ---- server actions (tools) then skills then the default agent
|
|
'data/ir_actions_server_data.xml',
|
|
'data/ai_skill_data.xml',
|
|
'data/ai_agent_data.xml',
|
|
'data/ir_cron.xml',
|
|
],
|
|
'assets': {
|
|
'web.assets_backend': [
|
|
# Order matters: the store model must be registered before the
|
|
# channel patch declares a relation to it.
|
|
'dn_ai/static/src/ai_agent_model.js',
|
|
'dn_ai/static/src/discuss_channel_patch.js',
|
|
# Client-side tool runner: the server returns `client_tool` payloads
|
|
# for navigation, but only the browser can honour them.
|
|
'dn_ai/static/src/client_tools.js',
|
|
# Patches that make the AI payload usable by the Community views.
|
|
# `SearchModel.applyAISearch` does not exist here, so these supply
|
|
# the equivalent (see web/search_model_patch.js).
|
|
'dn_ai/static/src/web/search_model_patch.js',
|
|
'dn_ai/static/src/web/search_bar_patch.js',
|
|
'dn_ai/static/src/web/view_patch.js',
|
|
# The AI conversation is rendered by Odoo's own chat window, so the
|
|
# agent loop is wired into the native send path (`Thread.post`)
|
|
# instead of a bespoke RPC from a custom panel.
|
|
'dn_ai/static/src/thread_patch.js',
|
|
'dn_ai/static/src/composer_patch.js',
|
|
'dn_ai/static/src/pending_request.js',
|
|
'dn_ai/static/src/pending_request.xml',
|
|
'dn_ai/static/src/pending_request.scss',
|
|
# Opens a conversation in the native window; shared by the floating
|
|
# button, the chatter action and the AI menu entry.
|
|
'dn_ai/static/src/ai_chat_launcher.js',
|
|
# `dn_ai.chat` client action: opens the conversation in the native
|
|
# window instead of rendering a page of its own.
|
|
'dn_ai/static/src/chat_action.js',
|
|
'dn_ai/static/src/chat_action.xml',
|
|
# Floating bottom-right entry point (main_components). Replaces the
|
|
# former navbar systray item, which used FontAwesome (removed in
|
|
# Odoo 20, so the icon never rendered) and collapsed into the burger
|
|
# menu on small screens.
|
|
'dn_ai/static/src/assistant.js',
|
|
'dn_ai/static/src/assistant.xml',
|
|
'dn_ai/static/src/assistant.scss',
|
|
'dn_ai/static/src/chatter_ai_button.js',
|
|
],
|
|
# Pivot and graph are only loaded on demand (they live in web's lazy
|
|
# bundle), so their controllers must be patched there — patching them in
|
|
# `assets_backend` would import the module eagerly and defeat the point.
|
|
'web.assets_backend_lazy': [
|
|
'dn_ai/static/src/web/pivot_controller_patch.js',
|
|
'dn_ai/static/src/web/graph_controller_patch.js',
|
|
],
|
|
},
|
|
'post_init_hook': 'post_init_hook',
|
|
}
|