websitor editor and header contact number issues fixed
This commit is contained in:
parent
6e30b81f9c
commit
eec2ca68f5
@ -10,6 +10,10 @@
|
|||||||
<record id="base.main_company" model="res.company">
|
<record id="base.main_company" model="res.company">
|
||||||
<field name="phone">+1(647)856-2878</field>
|
<field name="phone">+1(647)856-2878</field>
|
||||||
</record>
|
</record>
|
||||||
|
<!-- Update the website phone as well, as it might be used in the header -->
|
||||||
|
<record id="website.default_website" model="website">
|
||||||
|
<field name="phone">+1(647)856-2878</field>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
||||||
|
|||||||
@ -2,23 +2,8 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<template id="custom_main_layout" inherit_id="website.layout" name="Chennora Main Layout" priority="50">
|
<template id="custom_main_layout" inherit_id="website.layout" name="Chennora Main Layout" priority="50">
|
||||||
<xpath expr="//html" position="before">
|
<!-- Removed redundant html_data and head cache to fix editor loading issues -->
|
||||||
<!-- [ORIGINAL CONTENT PRESERVED] -->
|
|
||||||
<t t-set="html_data" t-value="{ 'lang': lang and lang.replace('_', '-'), 'data-website-id': website.id if website else None, 'data-edit_translations': '1' if edit_translations else None, 'data-main-object': repr(main_object) if main_object else None, 'data-seo-object': repr(seo_object) if seo_object else None, }"/>
|
|
||||||
<t t-if="not request.env.user._is_public() and main_object" t-set="nothing" t-value="html_data.update({ 'data-is-published': 'website_published' in main_object.fields_get() and main_object.website_published, 'data-can-optimize-seo': 'website_meta_description' in main_object.fields_get(), 'data-can-publish': 'can_publish' in main_object.fields_get() and main_object.can_publish, 'data-editable-in-backend': edit_in_backend or ('website_published' in main_object.fields_get() and main_object._name != 'website.page'), })"/>
|
|
||||||
<!--
|
|
||||||
TODO Review in master (this is a stable fix for new databases).
|
|
||||||
See REVIEW_CAN_PUBLISH_UNSUDO.
|
|
||||||
-->
|
|
||||||
<t t-if="html_data and html_data.get('data-can-publish') == True and main_object">
|
|
||||||
<t t-set="nothing" t-value="html_data.update({ 'data-can-publish': 'can_publish' in main_object.fields_get() and main_object.sudo(flag=False).can_publish, })"/>
|
|
||||||
</t>
|
|
||||||
<t t-if="editable or translatable" t-set="nothing" t-value="html_data.update({ 'data-editable': '1' if editable else None, 'data-translatable': '1' if translatable else None, 'data-view-xmlid': xmlid, 'data-viewid': viewid, })"/>
|
|
||||||
</xpath>
|
|
||||||
|
|
||||||
<xpath expr="//head" position="attributes">
|
|
||||||
<attribute name="t-cache">main_object if main_object and main_object._name == 'website.page' and not request.session.debug and not editable and not translatable else None</attribute>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//head/*[1]" position="before">
|
<xpath expr="//head/*[1]" position="before">
|
||||||
<t t-if="not title">
|
<t t-if="not title">
|
||||||
<t t-if="not additional_title and main_object and 'name' in main_object">
|
<t t-if="not additional_title and main_object and 'name' in main_object">
|
||||||
@ -86,11 +71,13 @@
|
|||||||
|
|
||||||
<!-- Header Phone Number Replacement - Targeted View -->
|
<!-- Header Phone Number Replacement - Targeted View -->
|
||||||
<template id="chennora_header_phone" inherit_id="website.header_text_element" name="Chennora Header Phone" priority="60">
|
<template id="chennora_header_phone" inherit_id="website.header_text_element" name="Chennora Header Phone" priority="60">
|
||||||
<xpath expr="//a[contains(@href, 'tel:')]" position="replace">
|
<xpath expr="/*" position="replace">
|
||||||
<a href="tel:+1(647)856-2878" class="nav-link o_nav-link_secondary p-2">
|
<div class="o_header_text_element">
|
||||||
<i class="fa fa-phone me-1"></i>
|
<a href="tel:+1(647)856-2878" class="nav-link o_nav-link_secondary p-2">
|
||||||
<span class="o_force_ltr">+1(647)856-2878</span>
|
<i class="fa fa-phone me-1"></i>
|
||||||
</a>
|
<span class="o_force_ltr">+1(647)856-2878</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -98,7 +85,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<xpath expr="//header/t[@t-cache]" position="attributes">
|
<xpath expr="//header/t[@t-cache]" position="attributes">
|
||||||
<attribute name="t-cache">None if website.is_menu_cache_disabled() else (xmlid,website,website.is_public_user())</attribute>
|
<!-- Removed missing method and dangerous cache logic -->
|
||||||
|
<attribute name="t-cache">None</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//header" position="before">
|
<xpath expr="//header" position="before">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user