forked from alaguraj/odoo-testing-addons
67 lines
3.2 KiB
XML
67 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Custom Address Form - Remove Company/VAT and Rename Zip to Postal Code -->
|
|
<!-- Increased priority to 99 to ensure it overrides other theme or base overrides -->
|
|
<template id="chennora_address_custom" inherit_id="website_sale.address" name="Chennora Address Custom" priority="99">
|
|
|
|
<!-- 1. Remove Company Name Field -->
|
|
<xpath expr="//div[label[@for='company_name']]" position="replace"/>
|
|
|
|
<!-- 2. Remove VAT Field -->
|
|
<xpath expr="//div[label[@for='vat']]" position="replace"/>
|
|
|
|
<!-- 3. Remove VAT Warning Message if it exists -->
|
|
<xpath expr="//small[contains(text(), 'VAT number is not allowed')]/.." position="replace"/>
|
|
|
|
<!-- 4. Rename Zip Code Label to Postal Code (Using more robust match) -->
|
|
<!-- 4. Rename Zip Code Label to Postal Code -->
|
|
<xpath expr="//label[@for='zip']" position="replace">
|
|
<label class="col-form-label label-optional" for="zip">Postal Code</label>
|
|
</xpath>
|
|
|
|
<!-- 6. Update Placeholder for Zip Input -->
|
|
<xpath expr="//input[@name='zip']" position="attributes">
|
|
<attribute name="placeholder">Postal Code</attribute>
|
|
</xpath>
|
|
|
|
<!-- 7. Hide "Ship to the same address" switch -->
|
|
<xpath expr="//input[@id='shipping_use_same']/ancestor::div[contains(@class, 'form-check')]" position="attributes">
|
|
<attribute name="class" add="d-none" separator=" "/>
|
|
</xpath>
|
|
|
|
<!-- 8. Change "Shipping address" / "Billing address" title to just "Address Details" -->
|
|
<xpath expr="//h3[contains(., 'address')]" position="replace">
|
|
<h3 class="mb-3">Address Details</h3>
|
|
</xpath>
|
|
|
|
<!-- 9. Remove the "Be aware!" warning box -->
|
|
<xpath expr="//div[contains(@class, 'alert-warning') and .//h4[contains(., 'Be aware')]]" position="replace"/>
|
|
</template>
|
|
|
|
<!-- Custom Checkout Page - Remove Shipping Section entirely -->
|
|
<template id="chennora_checkout_custom" inherit_id="website_sale.checkout" name="Chennora Checkout Custom" priority="99">
|
|
<!-- 1. Remove the "Billing" sub-header -->
|
|
<xpath expr="//h4[contains(., 'Billing')]" position="replace"/>
|
|
|
|
<!-- 2. Rename the "Shipping Address" header if it exists -->
|
|
<xpath expr="//h4[contains(., 'Shipping')]" position="replace">
|
|
<h4 class="mb-0">Address Details</h4>
|
|
</xpath>
|
|
|
|
<!-- 3. Completely remove the "Shipping" section block -->
|
|
<xpath expr="//t[@groups='account.group_delivery_invoice_address']" position="replace"/>
|
|
</template>
|
|
|
|
<!-- Custom Wizard - Rename Shipping step to Address -->
|
|
<template id="chennora_wizard_checkout_custom" inherit_id="website_sale.wizard_checkout" name="Chennora Wizard Custom" priority="99">
|
|
<xpath expr="//*[@t-call='website.step_wizard']" position="before">
|
|
<t t-foreach="wizard_step" t-as="step">
|
|
<t t-if="step[1].get('name') == 'Shipping'">
|
|
<t t-set="dummy" t-value="step[1].update({'name': 'Address'})"/>
|
|
</t>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|