Initial commit: OCA Website packages (16 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:06 +02:00
commit 0578ef7638
660 changed files with 37334 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@id='website_cookies_bar_setting']" position="inside">
<div class="o_setting_left_pane">
<field name="cookiefirst_enabled" />
</div>
<div class="o_setting_right_pane">
<label for="cookiefirst_enabled" />
<div class="text-muted">
Add Cookiefirst functionality
</div>
<div
class="content-group"
attrs="{'invisible': [('cookiefirst_enabled', '=', False)]}"
id="cookiefirst_fields"
>
<div class="row mt16">
<label
class="col-md-3 o_light_label"
string="Tracking ID"
for="cookiefirst_identifier"
/>
<field
name="cookiefirst_identifier"
placeholder="00000000-0000-0000-0000-000000000000"
attrs="{'required': [('cookiefirst_enabled', '!=', False)]}"
/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="footer_copyright_company_name"
inherit_id="website.footer_copyright_company_name"
>
<xpath expr="//span[hasclass('o_footer_copyright_name')]" position="after">
<span>-
<a href="/legal/cookies-policy">Cookies Policy</a>
</span>
</xpath>
</template>
<template id="layout" inherit_id="website.layout">
<xpath expr="//script[@id='tracking_code']" position="attributes">
<attribute name="type">text/plain</attribute>
<attribute name="data-cookiefirst-category">performance</attribute>
</xpath>
<xpath expr="//script[last()]" position="after">
<t t-if="website.cookiefirst_identifier and website.domain">
<script
t-attf-src="https://consent.cookiefirst.com/sites/{{ (website.domain or '').replace('http://', '').replace('https://', '').replace('www.', '') }}-{{ website.cookiefirst_identifier }}/consent.js"
/>
</t>
</xpath>
</template>
</odoo>