初始提交

This commit is contained in:
2026-11-04 19:58:07 +08:00
commit 53b7d22429
829 changed files with 469986 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_ai_deepseek" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.ai.deepseek</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app data-string="AI DeepSeek" string="AI DeepSeek" name="ai_deepseek" groups="base.group_system">
<block title="DeepSeek Bridge" name="ai_deepseek_bridge">
<setting id="ai_deepseek_enabled_setting"
string="Use DeepSeek instead of Odoo IAP"
help="Route all Odoo AI requests to DeepSeek. No Odoo credits required.">
<field name="ai_deepseek_enabled"/>
<div class="text-muted mt-2" colspan="2">
When disabled, Odoo falls back to the official
<code>https://ai.api.odoo.com</code> service (requires credits).
</div>
</setting>
<setting id="ai_deepseek_api_key_setting"
string="API Key"
help="Your DeepSeek API key (kept in a system parameter)."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_api_key" password="True" placeholder="sk-..."/>
</setting>
<setting id="ai_deepseek_base_url_setting"
string="Base URL"
help="Any OpenAI-compatible endpoint."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_base_url" placeholder="https://api.deepseek.com"/>
</setting>
<setting id="ai_deepseek_model_setting"
string="Chat Model"
help="e.g. deepseek-chat, deepseek-reasoner"
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_model" placeholder="deepseek-chat"/>
</setting>
<setting id="ai_deepseek_timeout_setting"
string="Timeout (s)"
help="HTTP timeout for a single DeepSeek request."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_timeout"/>
</setting>
</block>
<block title="Embeddings (RAG)" name="ai_deepseek_embeddings">
<setting id="ai_deepseek_emb_base_url_setting"
string="Embedding Base URL"
help="OpenAI-compatible /v1/embeddings endpoint. Must return 1536-dimension vectors to match Odoo's ai.embedding vector size. Leave empty to reuse the chat base URL."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_emb_base_url"/>
</setting>
<setting id="ai_deepseek_emb_api_key_setting"
string="Embedding API Key"
help="Leave empty to reuse the chat API key."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_emb_api_key" password="True"/>
</setting>
<setting id="ai_deepseek_emb_model_setting"
string="Embedding Model"
help="Must produce 1536-dimension vectors."
invisible="not ai_deepseek_enabled">
<field name="ai_deepseek_emb_model" placeholder="text-embedding-3-small"/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</odoo>