This commit is contained in:
2026-11-08 20:08:53 +08:00
parent 7526a5fe4d
commit 9b924747c5
2692 changed files with 394867 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.ai.website</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<block id="website_info_settings" position="inside">
<setting id="ai_website_scripts"
string="AI JavaScript"
help="Always let the AI website builder add JavaScript to your pages. When off, it asks before adding any scripts.">
<field name="ai_allow_scripts"/>
</setting>
</block>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="snippets" inherit_id="website.snippets">
<!-- Use xpath to make the snippet appear before other snippets -->
<xpath expr="//t[@t-snippet='website.s_title_form']" position="before">
<t t-install="ai_website_livechat" string="AI Live Chat" group="contact_and_forms" label="AI"
t-image-preview="/ai_website/static/src/img/snippet_previews/ai_livechat.webp"/>
<t id='ai_livechat_hook'/>
</xpath>
</template>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="layout" inherit_id="website.layout">
<xpath expr="//head" position="inside">
<!-- We need it to be ready before ai-gen scripts run. -->
<t t-call-assets="ai_website.ai_assets" t-css="false"/>
<!-- Recording what a script changes is only worth anything to
someone who can open the builder and revert it, so visitors
are not served it at all. -->
<t groups="website.group_website_restricted_editor"
t-call-assets="ai_website.ai_editor_assets" t-css="false"/>
</xpath>
</template>
</odoo>