Odoo18-Base/addons/l10n_ar_website_sale/views/templates.xml
2025-01-06 10:57:38 +07:00

83 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="partner_info" name="Argentinean partner">
<div class="col-xl-6 mb-3">
<label class="col-form-label" for="l10n_ar_afip_responsibility_type_id">AFIP Responsibility</label>
<t t-if="can_edit_vat">
<select name="l10n_ar_afip_responsibility_type_id" class="form-select">
<option value="">AFIP Responsibility...</option>
<t t-foreach="responsibility_types" t-as="resp_type">
<option t-att-value="resp_type.id"
t-att-selected="resp_type.id == partner_sudo.l10n_ar_afip_responsibility_type_id.id">
<t t-out="resp_type.name"/>
</option>
</t>
</select>
</t>
<t t-else="">
<p class="form-control"
t-out="partner_sudo.l10n_ar_afip_responsibility_type_id.name"
readonly="1"
title="Changing AFIP Responsibility type is not allowed once document(s) have been issued for your account. Please contact us directly for this operation."/>
<input name="l10n_ar_afip_responsibility_type_id"
class="form-control"
t-att-value="partner_sudo.l10n_ar_afip_responsibility_type_id.id"
type="hidden"/>
</t>
</div>
<div class="col-xl-6 mb-3">
<label class="col-form-label" for="l10n_latam_identification_type_id">Identification Type</label>
<t t-if="can_edit_vat">
<select name="l10n_latam_identification_type_id" class="form-select">
<option value="">Identification Type...</option>
<t t-foreach="identification_types" t-as="id_type">
<option t-att-value="id_type.id"
t-att-selected="id_type.id == partner_sudo.l10n_latam_identification_type_id.id">
<t t-out="id_type.name"/>
</option>
</t>
</select>
</t>
<t t-else="">
<p class="form-control"
t-out="partner_sudo.l10n_latam_identification_type_id.name"
readonly="1"
title="Changing Identification type is not allowed once document(s) have been issued for your account. Please contact us directly for this operation."/>
<input name="l10n_latam_identification_type_id"
class="form-control"
t-att-value="partner_sudo.l10n_latam_identification_type_id.id"
type="hidden"/>
</t>
</div>
</template>
<template id="address" inherit_id="website_sale.address">
<div id="div_vat" position="before">
<t t-if="(use_delivery_as_billing and address_type == 'delivery' or address_type == 'billing') and res_company.country_id.code == 'AR'">
<t t-call="l10n_ar_website_sale.partner_info"/>
</t>
</div>
</template>
<template id="portal_my_details_fields" name="portal_my_details_fields" inherit_id="portal.portal_my_details_fields">
<xpath expr="//input[@name='vat']/.." position="before">
<t t-if="res_company.country_code == 'AR'">
<t t-call="l10n_ar_website_sale.partner_info"/>
</t>
</xpath>
<label for="vat" position="replace">
<t t-if="res_company.country_id.code != 'AR'">$0</t>
<t t-else="">
<label class="col-form-label label-optional" for="vat">
Identification Number
</label>
</t>
</label>
</template>
</odoo>