30 lines
1.5 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 -->
<!-- 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="//label[@for='company_name']/.." position="replace"/>
<!-- 2. Remove VAT Field -->
<xpath expr="//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 -->
<!-- Targeting by 'for' attribute and by text content to be absolutely sure -->
<xpath expr="//label[@for='zip'] | //label[contains(text(), 'Zip')]" position="replace">
<label class="col-form-label fw-normal" for="zip">Postal Code</label>
</xpath>
<!-- 5. Update Placeholder for Zip Input -->
<xpath expr="//input[@name='zip']" position="attributes">
<attribute name="placeholder">Postal Code</attribute>
</xpath>
</template>
</odoo>