odoo18/addons/l10n_ae/views/report_invoice_templates.xml

68 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//span[@name='payment_term']" position="after">
<p t-if="o.company_id.country_id.code == 'AE' and o.partner_id.country_id.code != 'AE' and o.env.ref('l10n_ae.gcc_countries_group') in o.partner_id.country_id.country_group_ids">
Supply between <b>United Arab Emirates</b> and
<b>
<span t-field="o.partner_id.country_id.name"/>
</b>
</p>
</xpath>
<xpath expr="//t[@t-set='layout_document_title']/span" position="before">
<span t-if="o.company_id.country_id.code == 'AE' and o.move_type in ['out_invoice', 'out_refund']">TAX
</span>
</xpath>
<xpath expr="//thead//th[@name='th_taxes']" position="replace">
<th name="th_taxes"
t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-if="o.company_id.country_id.code == 'AE'">VAT</span>
<span t-else="">Taxes</span>
</th>
<th t-if="o.company_id.country_id.code == 'AE'" name="tax_amount"
t-attf-class="text-start {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>VAT Amount</span>
</th>
</xpath>
<xpath expr="//span[@id='line_tax_ids']/.." position="after">
<td t-if="o.company_id.country_id.code == 'AE'">
<span t-field="line.l10n_ae_vat_amount" id="line_tax_amount"/>
</td>
</xpath>
<xpath expr="//td[@name='td_subtotal']/span" position="attributes">
<attribute name="t-if">o.company_id.country_id.code != 'AE' or o.company_price_include == 'tax_excluded'</attribute>
</xpath>
<xpath expr="//td[@name='td_subtotal']/span" position="after">
<span t-if="o.company_id.country_id.code == 'AE' and o.company_price_include == 'tax_included'" class="text-nowrap" t-field="line.price_total">31.05</span>
</xpath>
<xpath expr="//th[@name='th_subtotal']" position="after">
<th class="text-end" t-if="o.company_id.country_id.code == 'AE' and o.currency_id != o.company_currency_id">
<span>Amount (<span t-field="o.company_currency_id"/>)</span>
</th>
</xpath>
<xpath expr="//td[@name='td_subtotal']" position="after">
<td class="text-end o_price_total" t-if="o.company_id.country_id.code == 'AE' and o.currency_id != o.company_currency_id">
<span class="text-nowrap" t-if="o.company_price_include == 'tax_excluded'" t-out="line.currency_id._convert(line.price_subtotal, o.company_currency_id, o.company_id, o.invoice_date or datetime.date.today())" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
<span class="text-nowrap" t-if="o.company_price_include == 'tax_included'" t-out="line.currency_id._convert(line.price_total, o.company_currency_id, o.company_id, o.invoice_date or datetime.date.today())" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
</td>
</xpath>
</template>
<template id="document_tax_totals_company_currency_template" inherit_id="account.document_tax_totals_company_currency_template">
<xpath expr="//p[hasclass('tax_computation_company_currency')]" position="after">
<tr t-if="o.company_id.country_id.code == 'AE'">
<t t-set="exchange_rate" t-if="o.amount_total" t-value="abs(o.amount_total_signed) / o.amount_total"/>
<t t-set="exchange_rate" t-else="" t-value="o.env['res.currency']._get_conversion_rate(o.currency_id, o.company_id.currency_id, o.company_id, o.invoice_date or datetime.date.today())"/>
<td>Exchange Rate</td>
<td class="text-end" t-out="exchange_rate" t-options='{"widget": "float", "precision": 5}'/>
</tr>
</xpath>
</template>
</odoo>