summaryrefslogtreecommitdiff
path: root/addons/l10n_ae/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_ae/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/l10n_ae/views')
-rw-r--r--addons/l10n_ae/views/report_invoice_templates.xml35
1 files changed, 35 insertions, 0 deletions
diff --git a/addons/l10n_ae/views/report_invoice_templates.xml b/addons/l10n_ae/views/report_invoice_templates.xml
new file mode 100644
index 00000000..0018bc69
--- /dev/null
+++ b/addons/l10n_ae/views/report_invoice_templates.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <template id="report_invoice_document" inherit_id="account.report_invoice_document">
+ <xpath expr="//p[@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 Arad Emirates</b> and <b><span t-field="o.partner_id.country_id.name"/></b>
+ </p>
+ </xpath>
+ <xpath expr="//h2/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="//div[hasclass('clearfix')]" position="after">
+ <div t-if="o.company_id.country_id.code == 'AE' and o.currency_id != o.company_id.currency_id" id="aed_amounts" class="row clearfix ml-auto my-3 text-nowrap table">
+ <t t-set="aed_rate" 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())"/>
+ <div name="exchange_rate" class="col-auto">
+ <strong>Exchange Rate</strong>
+ <p class="m-0" t-esc="aed_rate" t-options='{"widget": "float", "precision": 5}'/>
+ </div>
+ <div name="aed_subtotal" class="col-auto">
+ <strong>Subtotal (AED)</strong>
+ <p class="m-0" t-esc="o.amount_untaxed_signed" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
+ </div>
+ <div name="aed_vat_amount" class="col-auto">
+ <strong>Tax Amount (AED)</strong>
+ <p class="m-0" t-esc="o.currency_id._convert(o.amount_tax, o.company_id.currency_id, o.company_id, o.invoice_date or datetime.date.today())" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
+ </div>
+ <div name="aed_total" class="col-auto">
+ <strong>Total (AED)</strong>
+ <p class="m-0" t-esc="o.amount_total_signed" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
+ </div>
+ </div>
+ </xpath>
+ </template>
+</odoo>