19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:34 +01:00
parent c5006a6999
commit 80293571e7
420 changed files with 21812 additions and 44297 deletions

View file

@ -6,8 +6,8 @@
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//tree//field[@name='tax_ids']" position="after">
<field name="l10n_ae_vat_amount" optional="show"/>
<xpath expr="//list//field[@name='tax_ids']" position="after">
<field name="l10n_gcc_invoice_tax_amount" string="VAT Amount" optional="show" column_invisible="parent.country_code != 'AE'"/>
</xpath>
</field>
</record>

View file

@ -1,77 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@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>
<template id="l10n_ae_report_invoice_document" inherit_id="l10n_gcc_invoice.l10n_gcc_report_invoice_document" primary="True">
<!-- Titles -->
<t name="credit_note_title" position="replace">
<t name="credit_note_title">Tax Credit Note</t>
</t>
<t name="credit_note_title_ar" position="replace">
<t name="credit_note_title_ar">إشعار دائن ضريبي</t>
</t>
<t name="credit_note_title_en" position="replace">
<t name="credit_note_title_en">Tax Credit Note</t>
</t>
<!-- End Titles -->
<!-- Invoice table -->
<th name="th_taxes" position="after">
<t t-if="display_taxes">
<th name="th_vat_amount" class="text-end">
<span name="th_vat_amount_span_ar" t-if="display_in_ar" t-translation="off">مبلغ الضريبة<br/></span>
<span name="th_vat_amount_span_en" t-if="display_in_en" t-translation="off">VAT Amount<br/></span>
<span name="th_vat_amount_span">VAT Amount</span>
</th>
</t>
</th>
<th name="th_subtotal" position="after">
<t t-if="o.currency_id != o.company_currency_id">
<th name="th_subtotal_curr" class="text-end">
<span name="th_subtotal_curr_span_ar" t-if="display_in_ar" t-translation="off">(<span t-field="o.company_currency_id"/>) المبلغ<br/></span>
<span name="th_subtotal_curr_span_en" t-if="display_in_en" t-translation="off" dir="ltr">Amount (<span t-field="o.company_currency_id"/>)<br/></span>
<span name="th_subtotal_curr_span">Amount (<span t-field="o.company_currency_id"/>)</span>
</th>
</t>
</th>
<td name="td_taxes" position="after">
<t t-if="display_taxes">
<td name="td_vat_amount" class="text-end">
<span t-if="not hide_prices" name="td_vat_amount_span" t-field="line.l10n_gcc_invoice_tax_amount"/>
</td>
</t>
</td>
<td name="td_subtotal" position="after">
<t t-if="o.currency_id != o.company_currency_id">
<td name="td_subtotal_curr" class="text-end">
<span name="td_subtotal_curr_excl_span" class="text-nowrap" t-if="o.company_price_include == 'tax_excluded' and not hide_prices"
t-out="line.price_subtotal * 1 / o.invoice_currency_rate"
t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
<span name="td_subtotal_curr_incl_span" class="text-nowrap" t-if="o.company_price_include == 'tax_included' and not hide_prices"
t-out="line.price_total * 1 / o.invoice_currency_rate"
t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
</td>
</t>
</td>
<td name="td_subtotal_grouped" position="before">
<td name="td_vat_amount_grouped" t-attf-class="text-end">
<span t-if="(grouped_line.get('display_type') in ('line_section', 'line_subsection') or hide_details)" t-out="grouped_line['l10n_gcc_invoice_tax_amount']" t-options='{"widget": "monetary", "display_currency": o.currency_id}' class="text-nowrap">4.05</span>
</td>
</td>
<td name="td_subtotal_grouped" position="after">
<td name="th_subtotal_curr_grouped" class="text-end" t-if="o.currency_id != o.company_currency_id">
<span t-if="(grouped_line.get('display_type') in ('line_section', 'line_subsection') or hide_details) and o.company_price_include == 'tax_excluded'" class="text-nowrap" t-out="grouped_line['price_subtotal'] * 1 / o.invoice_currency_rate" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'>27.00</span>
<span t-if="(grouped_line.get('display_type') in ('line_section', 'line_subsection') or hide_details) and o.company_price_include == 'tax_included'" class="text-nowrap" t-out="grouped_line['price_total'] * 1 / o.invoice_currency_rate" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'>27.00</span>
</td>
</td>
<xpath expr="//span[@t-out='section_subtotal']/.." position="attributes">
<attribute name="colspan">2</attribute>
</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="//thead//th[@name='th_taxes']" position="replace">
<th name="th_taxes"
t-attf-class="text-start {{ '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"/>
<xpath expr="//t[@t-elif=&quot;line.display_type in ('line_section', 'line_subsection')&quot;]//span[@t-out='section_subtotal']/.." position="after">
<td colspan="1" class="text-end o_price_total" t-if="o.currency_id != o.company_currency_id">
<span class="text-nowrap"
t-out="section_subtotal * 1 / o.invoice_currency_rate"
t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</td>
</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 ms-auto my-3 text-nowrap table table-borderless border-dark border-top border-2 pt-2 text-center">
<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>VAT 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-out="o.amount_total_signed"
t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</div>
</div>
</xpath>
<xpath expr="//th[@name='th_subtotal']" position="after">
<th class="text-end" t-if="o.currency_id != o.company_currency_id">
<span groups="account.group_show_line_subtotals_tax_excluded">Amount (AED)</span>
<span groups="account.group_show_line_subtotals_tax_included">Total Price (AED)</span>
</th>
</xpath>
<xpath expr="//td[hasclass('o_price_total')]" position="after">
<td class="text-end o_price_total" t-if="o.currency_id != o.company_currency_id">
<span groups="account.group_show_line_subtotals_tax_excluded" class="text-nowrap" 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 groups="account.group_show_line_subtotals_tax_included" class="text-nowrap" 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>
<!-- End Invoice table -->
<t t-set="show_exchange_rate" position="attributes">
<attribute name="t-value">1</attribute>
</t>
</template>
<!-- Workaround for Studio reports, see odoo/odoo#60660 -->
<template id="report_invoice" inherit_id="account.report_invoice">
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
<t t-elif="o._get_name_invoice_report() == 'l10n_ae.l10n_ae_report_invoice_document'"
t-call="l10n_ae.l10n_ae_report_invoice_document"
t-lang="lang"/>
</xpath>
</template>
</odoo>